Paul Gofman (@gofman) commented about dlls/kernel32/tests/sync.c:
ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());status = pNtWaitForSingleObject(non_waitable_pseudohandles[i], FALSE, NULL);todo_wine_if((non_waitable_pseudohandles[i] == NtCurrentProcessToken() ||non_waitable_pseudohandles[i] == NtCurrentEffectiveToken()) &&status == STATUS_OBJECT_TYPE_MISMATCH)ok(status == STATUS_INVALID_HANDLE, "expected STATUS_INVALID_HANDLE, got %08lx\n", status);- }
- timeout.QuadPart = -1000000;
- status = pNtWaitForSingleObject(GetCurrentThread(), FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "expected STATUS_TIMEOUT, got %08lx\n", status);
- /* std handles are only allowed in WaitForSingleObject and not NtWaitForSingleObject */
- for (i = 0; i < ARRAY_SIZE(std_handles); i++)
- {
ret = WaitForSingleObject(std_handles[i], 100);
We don't need wait 100ms here if it is going to timeout, let it be 0 and timeout or succeed at once not to waste test time.