From 55542281f5dcd0c538d0c5740f7ce13b1f92b04c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Hentschel?= Date: Sun, 25 Sep 2011 20:30:40 +0200 Subject: [PATCH] ntdll/tests: Don't test function directly when reporting GetLastError(). --- dlls/ntdll/tests/pipe.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 8f7bd8fe51..690988223c 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -238,8 +238,10 @@ static DWORD WINAPI thread(PVOID main_thread) Sleep(400); if (main_thread) { + DWORD ret; userapc_called = FALSE; - ok(pQueueUserAPC(&userapc, main_thread, 0), "can't queue user apc, GetLastError: %x\n", GetLastError()); + ret = pQueueUserAPC(&userapc, main_thread, 0); + ok(ret, "can't queue user apc, GetLastError: %x\n", GetLastError()); CloseHandle(main_thread); } @@ -264,6 +266,7 @@ static void test_alertable(void) HANDLE hPipe; NTSTATUS res; HANDLE hThread; + DWORD ret; memset(&iosb, 0x55, sizeof(iosb)); @@ -275,7 +278,8 @@ static void test_alertable(void) /* queue an user apc before calling listen */ userapc_called = FALSE; - ok(pQueueUserAPC(&userapc, GetCurrentThread(), 0), "can't queue user apc, GetLastError: %x\n", GetLastError()); + ret = pQueueUserAPC(&userapc, GetCurrentThread(), 0); + ok(ret, "can't queue user apc, GetLastError: %x\n", GetLastError()); res = listen_pipe(hPipe, hEvent, &iosb, TRUE); todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res); @@ -332,6 +336,7 @@ static void test_nonalertable(void) HANDLE hPipe; NTSTATUS res; HANDLE hThread; + DWORD ret; memset(&iosb, 0x55, sizeof(iosb)); @@ -345,7 +350,8 @@ static void test_nonalertable(void) ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError()); userapc_called = FALSE; - ok(pQueueUserAPC(&userapc, GetCurrentThread(), 0), "can't queue user apc, GetLastError: %x\n", GetLastError()); + ret = pQueueUserAPC(&userapc, GetCurrentThread(), 0); + ok(ret, "can't queue user apc, GetLastError: %x\n", GetLastError()); res = listen_pipe(hPipe, hEvent, &iosb, TRUE); todo_wine ok(!res, "NtFsControlFile returned %x\n", res); -- 2.32.0.93.g670b81a890