On Mon Jul 11 15:14:43 2022 +0000, Jinoh Kang wrote:
How about the following race-free approach?
/* wait for I/O to start, which transitions the pipe handle from signaled to nonsignaled state. */ while ((wait_status = WaitForSingleObject(pipe, 0)) == WAIT_OBJECT_0) Sleep(1); ok(wait_status == WAIT_TIMEOUT, "WaitForSingleObject returned %lu (error %lu)\n", wait_status, GetLastError());
Ditto for other places.
i had copied the `Sleep(100)` from one of the sync.c tests, i think. but if it makes the test less flaky, i'll take it. thanks!