[PATCH 3/4] psapi/tests: Avoid failing silently.

Zebediah Figura z.figura12 at gmail.com
Thu Jul 5 17:05:38 CDT 2018


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 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 3fec5d7..99d081f 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);
-- 
2.7.4




More information about the wine-devel mailing list