From 42016f6f0e8b3990b570899479dbf5df1c2736cf Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 6 Jul 2018 00:05:38 +0200 Subject: [PATCH] psapi/tests: Avoid failing silently. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/psapi/tests/psapi_main.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index 3fec5d74561..99d081feed2 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -819,23 +819,24 @@ START_TEST(psapi_main) IsWow64Process(GetCurrentProcess(), &wow64); hpSR = OpenProcess(STANDARD_RIGHTS_REQUIRED, FALSE, pid); + ok(!!hpSR, "got error %u\n", GetLastError()); hpQI = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid); + ok(!!hpQI, "got error %u\n", GetLastError()); hpVR = OpenProcess(PROCESS_VM_READ, FALSE, pid); + ok(!!hpVR, "got error %u\n", GetLastError()); hpQV = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid); + ok(!!hpQV, "got error %u\n", GetLastError()); - if(hpSR && hpQI && hpVR && hpQV) - { - test_EnumProcesses(); - test_EnumProcessModules(); - test_GetModuleInformation(); - test_GetPerformanceInfo(); - test_GetProcessMemoryInfo(); - test_GetMappedFileName(); - test_GetProcessImageFileName(); - test_GetModuleFileNameEx(); - test_GetModuleBaseName(); - test_ws_functions(); - } + test_EnumProcesses(); + test_EnumProcessModules(); + test_GetModuleInformation(); + test_GetPerformanceInfo(); + test_GetProcessMemoryInfo(); + test_GetMappedFileName(); + test_GetProcessImageFileName(); + test_GetModuleFileNameEx(); + test_GetModuleBaseName(); + test_ws_functions(); CloseHandle(hpSR); CloseHandle(hpQI);