kernel32/tests: Verify the stability of CreateTimerQueue.

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Wed Mar 14 05:32:21 CDT 2012


this should have been labeled [PATCH 3/3] because tests will fail without my 2 ntdll patches.

First a note unrelated to my patches: if you run the tests in git in a loop,
sometimes one DeleteTimerQueueTimer(INVALID_HANDLE_VALUE)
fails (presumably with IO_PENDING) because a callback was executing concurrently.
Did Dan or anybody else running tests repeatedly observe this?
Surprisingly, test.winehq shows next to nothing like this:
but one failure comes close (not sure if it's the same):
sync.c:867: Test failed: DeleteTimerQueueTimer

The present tests demonstrate the "callback running past Delete" bug
as well as the stability/average issue.

I'm not entirely satisfied with the average tests, but I don't know
how to make it more reliable without dropping it entirely.
I don't like tests that occasionally fail, but I abhor things that are not tested at all.

If I don't check average values, Wine's lack of compliance since Vista goes unnoticed.
If I test them, there's a random issue with testbot, where the VM appears to
occasionally sleep for hundred milliseconds. Of course that kills any test of the average rate.
sync.c:615: thread 1792 hpctime  467 delta 11
sync.c:615: thread 1792 hpctime  627 delta 160
sync.c:615: thread 1792 hpctime  650 delta 23
Also, the tests are somewhat sensitive to load average. I've made them work on my
machine, compiling and running Firefox concurrently, yet sometimes the Linux scheduler
decides to do something else (kernel 3.3 is expected to behave better...).

One possibility would be to systematically use
if (winetest_debug > 1)  /* instead of > 0 */
   ok(lower < avg < upper, "average rate...
but then, neither test.winehq nor make test will perform the check.

I've been using
if (winetest_debug > 0)
partly because the trace output in a Gnome-terminal slows down wine such that the tests fail
-- redirect output to a file and the problem goes away (testbot does this) --
and partly because make -j can cause a high system load, causing an inability to
maintain the average rate (make test uses runtest -q, i.e. winetest_debug==0).

 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-kernel32-tests-Verify-the-stability-of-CreateTimerQ.patch
Type: application/octet-stream
Size: 5552 bytes
Desc: 0003-kernel32-tests-Verify-the-stability-of-CreateTimerQ.patch
URL: <>

More information about the wine-patches mailing list