Commit 55542281 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

ntdll/tests: Don't test function directly when reporting GetLastError().

parent 0ba0f505
...@@ -238,8 +238,10 @@ static DWORD WINAPI thread(PVOID main_thread) ...@@ -238,8 +238,10 @@ static DWORD WINAPI thread(PVOID main_thread)
Sleep(400); Sleep(400);
if (main_thread) { if (main_thread) {
DWORD ret;
userapc_called = FALSE; 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); CloseHandle(main_thread);
} }
...@@ -264,6 +266,7 @@ static void test_alertable(void) ...@@ -264,6 +266,7 @@ static void test_alertable(void)
HANDLE hPipe; HANDLE hPipe;
NTSTATUS res; NTSTATUS res;
HANDLE hThread; HANDLE hThread;
DWORD ret;
memset(&iosb, 0x55, sizeof(iosb)); memset(&iosb, 0x55, sizeof(iosb));
...@@ -275,7 +278,8 @@ static void test_alertable(void) ...@@ -275,7 +278,8 @@ static void test_alertable(void)
/* queue an user apc before calling listen */ /* queue an user apc before calling listen */
userapc_called = FALSE; 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); res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res); todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res);
...@@ -332,6 +336,7 @@ static void test_nonalertable(void) ...@@ -332,6 +336,7 @@ static void test_nonalertable(void)
HANDLE hPipe; HANDLE hPipe;
NTSTATUS res; NTSTATUS res;
HANDLE hThread; HANDLE hThread;
DWORD ret;
memset(&iosb, 0x55, sizeof(iosb)); memset(&iosb, 0x55, sizeof(iosb));
...@@ -345,7 +350,8 @@ static void test_nonalertable(void) ...@@ -345,7 +350,8 @@ static void test_nonalertable(void)
ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError()); ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError());
userapc_called = FALSE; 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); res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
todo_wine ok(!res, "NtFsControlFile returned %x\n", res); todo_wine ok(!res, "NtFsControlFile returned %x\n", res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment