Am Sonntag, 8. September 2013, 11:32:26 schrieb Francois Gouget:
On Thu, 5 Sep 2013, Wolfgang Walter wrote: [...]
To see that my later patches are needed you must modify the test a little bit:
- dlls/kernel32/tests/comm.c.old 2013-09-05 13:40:10.275757373 +0200
+++ dlls/kernel32/tests/comm.c 2013-09-05 13:40:06.779074398 +0200 @@ -844,6 +844,8 @@
after - before, bytes, baud); /* don't wait for WriteFile completion */
Sleep(2000);
S(U(ovl_wait)).Offset = 0; S(U(ovl_wait)).OffsetHigh = 0; ovl_wait.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
I did not look at the specifics of this case but I agree with the general principle of making tests reasonably independent from each other. This way we know exactly what works and what does not. It's not an absolute rule but we do try for that already when we reset LastError between tests for instance, or in some other cases when we delete some resource and recreate it for each test.
I guess the above is not really the patch that you propose but I'll still comment on it: we also want the tests to run as fast as possible so Sleep() is bad. However if we were to Sleep() only if the previous test failed I think that would be ok.
Indeed this patch is not the proposed one. It is a variation of a test to show a different problem.
My patch to make two tests more independed from each other only sleeps if the first test fails.
Regards,