Paul Gofman (@gofman) commented about dlls/kernel32/tests/sync.c:
ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %ld\n", ret); ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
- /* pseudo handles are allowed in WaitForSingleObject and NtWaitForSingleObject */
- ret = WaitForSingleObject(GetCurrentProcess(), 100);
- ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", ret);
- /* waitable pseudo-handles are allowed in WaitForSingleObject and NtWaitForSingleObject,
* but not in NtWaitForMultipleObjects, see test_WaitForMultipleObjects */- for (i = 0; i < ARRAY_SIZE(waitable_pseudohandles); i++)
- {
ret = WaitForSingleObject(waitable_pseudohandles[i], 100);ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %lu\n", ret);
Here and throughout the rest of the test, whenever we expect timeout to happen, and when in this case it is not subject to interaction with any other place, we can just wait with 0 timeout (both for kerbelbase and Nt functions). Currently the added test increases the test run time greatly without good reason.