kernel32/tests: Verify the stability of CreateTimerQueue.

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


Hi,

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:
http://test.winehq.org/data/tests/kernel32:sync.html
but one failure comes close (not sure if it's the same):
http://test.winehq.org/data/e79644e6a96eae419082ec78ce8ff3294888d05d/2000_fg-win2000-4sp/kernel32:sync.html
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.
http://testbot.winehq.org/JobDetails.pl?Key=17338&log_203=1#k203
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).

Regards,
 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: <http://www.winehq.org/pipermail/wine-patches/attachments/20120314/ca47c42b/attachment.obj>


More information about the wine-patches mailing list