Module: wine Branch: master Commit: 96b6dbc94926363a2305913aec17119c85d6d449 URL: https://source.winehq.org/git/wine.git/?a=commit;h=96b6dbc94926363a2305913ae...
Author: Arkadiusz Hiler ahiler@codeweavers.com Date: Mon Nov 8 19:38:34 2021 +0200
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
---
dlls/ucrtbase/tests/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ucrtbase/tests/thread.c b/dlls/ucrtbase/tests/thread.c index 8fffbffb38e..7693304e612 100644 --- a/dlls/ucrtbase/tests/thread.c +++ b/dlls/ucrtbase/tests/thread.c @@ -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());