Skip to content
Snippets Groups Projects
Commit a56e0ba4 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard
Browse files

ws2_32: Test wait alertability in WSAGetOverlappedResult().

parent 98cdd828
No related branches found
No related tags found
No related merge requests found
......@@ -12657,6 +12657,20 @@ static void test_WSAGetOverlappedResult(void)
}
}
 
overlapped.Internal = STATUS_PENDING;
overlapped.hEvent = CreateEventW(NULL, TRUE, TRUE, NULL);
apc_count = 0;
ret = QueueUserAPC(apc_func, GetCurrentThread(), (ULONG_PTR)&apc_count);
ok(ret, "QueueUserAPC returned %d\n", ret);
ret = WSAGetOverlappedResult(s, &overlapped, &size, TRUE, &flags);
ok(ret && (GetLastError() == ERROR_IO_PENDING || !WSAGetLastError()),
"Got ret %d, err %lu.\n", ret, GetLastError());
ok(!apc_count, "got apc_count %d.\n", apc_count);
SleepEx(0, TRUE);
ok(apc_count == 1, "got apc_count %d.\n", apc_count);
CloseHandle(overlapped.hEvent);
closesocket(s);
}
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment