Sebastian Lackner : ntdll/tests: Add Sleep to make threadpool wait tests more reliable.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 9 09:55:21 CDT 2015
Module: wine
Branch: master
Commit: e37cdbbc2c3f772ea9d8cac4031f7d5b8bb28814
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e37cdbbc2c3f772ea9d8cac4031f7d5b8bb28814
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Fri Oct 9 06:36:39 2015 +0200
ntdll/tests: Add Sleep to make threadpool wait tests more reliable.
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/tests/threadpool.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/tests/threadpool.c b/dlls/ntdll/tests/threadpool.c
index ec0a29c..d4e13bd 100644
--- a/dlls/ntdll/tests/threadpool.c
+++ b/dlls/ntdll/tests/threadpool.c
@@ -215,9 +215,9 @@ static void test_RtlRegisterWait(void)
ok(info.userdata == 2, "expected info.userdata = 2, got %u\n", info.userdata);
result = WaitForSingleObject(semaphores[1], 0);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
+ Sleep(50);
status = RtlDeregisterWait(wait1);
- ok(!status || broken(status == STATUS_PENDING) /* >= Win 8 */,
- "RtlDeregisterWait failed with status %x\n", status);
+ ok(!status, "RtlDeregisterWait failed with status %x\n", status);
/* repeat test with WT_EXECUTEONLYONCE */
info.userdata = 0;
@@ -233,6 +233,7 @@ static void test_RtlRegisterWait(void)
ok(info.userdata == 1, "expected info.userdata = 1, got %u\n", info.userdata);
result = WaitForSingleObject(semaphores[1], 0);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
+ Sleep(50);
status = RtlDeregisterWait(wait1);
ok(!status, "RtlDeregisterWait failed with status %x\n", status);
@@ -248,9 +249,9 @@ static void test_RtlRegisterWait(void)
ok(info.userdata == 0x10000, "expected info.userdata = 0x10000, got %u\n", info.userdata);
result = WaitForSingleObject(semaphores[1], 0);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
+ Sleep(50);
status = RtlDeregisterWait(wait1);
- ok(!status || broken(status == STATUS_PENDING) /* >= Win 8 */,
- "RtlDeregisterWait failed with status %x\n", status);
+ ok(!status, "RtlDeregisterWait failed with status %x\n", status);
/* finite timeout, with event */
info.userdata = 0;
@@ -265,9 +266,9 @@ static void test_RtlRegisterWait(void)
ok(info.userdata == 1, "expected info.userdata = 1, got %u\n", info.userdata);
result = WaitForSingleObject(semaphores[1], 0);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
+ Sleep(50);
status = RtlDeregisterWait(wait1);
- ok(!status || broken(status == STATUS_PENDING) /* >= Win 8 */,
- "RtlDeregisterWait failed with status %x\n", status);
+ ok(!status, "RtlDeregisterWait failed with status %x\n", status);
/* test RtlDeregisterWaitEx before wait expired */
info.userdata = 0;
More information about the wine-cvs
mailing list