Paul Gofman (@gofman) commented about dlls/kernel32/tests/sync.c:
status = pNtWaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, maxevents, WaitAny, FALSE, &timeout);ok(status == STATUS_INVALID_HANDLE, "expected STATUS_INVALID_HANDLE, got %08lx\n", status);timeout.QuadPart = -1000000;status = pNtWaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, maxevents, WaitAll, FALSE, &timeout);ok(status == STATUS_INVALID_HANDLE, "expected STATUS_INVALID_HANDLE, got %08lx\n", status);maxevents[MAXIMUM_WAIT_OBJECTS - 1] = maxevents[0];- }
- /* Similar to WaitForSingleObject std handles are only allowed in WaitForMultipleObjects and
* not NtWaitForMultipleObjects (for brevity we only test single count WaitAny here) */- for (i = 0; i < ARRAY_SIZE(std_handles); i++)
- {
maxevents[0] = std_handles[i];SetLastError(0xdeadbeef);r = WaitForMultipleObjects(1, maxevents, FALSE, 100);ok(r != WAIT_FAILED, "expected non-fail result, got %lu (GetLastError()=%lu)\n", r, GetLastError());
Is it possible to be specific in wait result here, maybe depending on the pseudo handle type? Or, if for some std handles it may timeout or succeed, accept any of those results but not generic '!= WAIT_FAILED'.