ucrtbase/tests: Test for FreeLibrary() vs _beginthread[ex]() race condition.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Arkadiusz Hiler 2021-11-08 19:38:34 +02:00 committed by Alexandre Julliard
parent 04bb9112d2
commit 96b6dbc949
1 changed files with 2 additions and 2 deletions

View File

@ -105,11 +105,11 @@ static void test_thread_library_reference(char *thread_dll,
ok(thread_handle != -1 && thread_handle != 0, "Failed to begin thread: %u\n", errno);
ok(FreeLibrary(dll), "Failed to free the library: %u\n", GetLastError());
ret = WaitForSingleObject(args.confirm_running, 200);
ok(ret == WAIT_OBJECT_0, "Event was not signaled, ret: %u, err: %u\n", ret, GetLastError());
ok(FreeLibrary(dll), "Failed to free the library: %u\n", GetLastError());
ret = WaitForSingleObject(detach_event, 0);
ok(ret == WAIT_TIMEOUT, "Thread detach happened unexpectedly signaling an event, ret: %d, err: %u\n", ret, GetLastError());