[PATCH] ntdll/tests: Relax tests for RtlWaitOnAddress() timeout.

Zebediah Figura z.figura12 at gmail.com
Thu Jun 17 11:48:41 CDT 2021


RtlWaitOnAddress() shouldn't be waiting for less than 100 ms here, and it isn't,
but using GetTickCount() to measure this can result in up to 15 ms of error,
causing frequent test failures.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
Note that this never seems to fail on Windows, though. It may be that Windows is
updating the user shared data on every system call. That's not exactly trivial
for Wine to do, though.

 dlls/ntdll/tests/om.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index a7f8eaa84e1..82f8188d176 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -2304,7 +2304,7 @@ static void test_wait_on_address(void)
     status = pRtlWaitOnAddress(&address, &compare, 8, &timeout);
     ticks = GetTickCount() - ticks;
     ok(status == STATUS_TIMEOUT, "got 0x%08x\n", status);
-    ok(ticks >= 90 && ticks <= 1000, "got %u\n", ticks);
+    ok(ticks >= 80 && ticks <= 1000, "got %u\n", ticks);
     ok(address == 0, "got %s\n", wine_dbgstr_longlong(address));
     ok(compare == 0, "got %s\n", wine_dbgstr_longlong(compare));
 
@@ -2319,7 +2319,7 @@ static void test_wait_on_address(void)
         status = pRtlWaitOnAddress(&address, &compare, size, &timeout);
         ticks = GetTickCount() - ticks;
         ok(status == STATUS_TIMEOUT, "got 0x%08x\n", status);
-        ok(ticks >= 90 && ticks <= 1000, "got %u\n", ticks);
+        ok(ticks >= 80 && ticks <= 1000, "got %u\n", ticks);
 
         status = pRtlWaitOnAddress(&address, &compare, size << 1, &timeout);
         ok(!status, "got 0x%08x\n", status);
-- 
2.30.2




More information about the wine-devel mailing list