Myah Caron : ntdll/tests: Add test to check if GetTickCount is updated after sleeping.
Alexandre Julliard
julliard at winehq.org
Tue Jul 14 16:23:38 CDT 2020
Module: wine
Branch: master
Commit: 4617f83fcf0a34fe41b0e38dde1567195395efca
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4617f83fcf0a34fe41b0e38dde1567195395efca
Author: Myah Caron <qsniyg at protonmail.com>
Date: Mon Jul 13 17:08:38 2020 +0000
ntdll/tests: Add test to check if GetTickCount is updated after sleeping.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49564
Signed-off-by: Myah Caron <qsniyg at protonmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/tests/time.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/time.c b/dlls/ntdll/tests/time.c
index d756a8c839..a00d507e4e 100644
--- a/dlls/ntdll/tests/time.c
+++ b/dlls/ntdll/tests/time.c
@@ -199,7 +199,7 @@ static void test_user_shared_data_time(void)
{
KSHARED_USER_DATA *user_shared_data = (void *)0x7ffe0000;
ULONGLONG t1, t2, t3;
- int i = 0;
+ int i = 0, changed = 0;
i = 0;
do
@@ -253,6 +253,15 @@ static void test_user_shared_data_time(void)
"USD InterruptTime / RtlQueryUnbiasedInterruptTime are out of order %s %s\n",
wine_dbgstr_longlong(t2), wine_dbgstr_longlong(t3));
}
+
+ for (i = 0; i < 100; i++)
+ {
+ t1 = GetTickCount();
+ Sleep(1);
+ t2 = GetTickCount();
+ if (t1 != t2) changed++;
+ }
+ todo_wine ok(changed >= 90, "tick count isn't updated after sleeping one millisecond (%d%% correct)\n", changed);
}
START_TEST(time)
More information about the wine-cvs
mailing list