Am Mittwoch, 23. Oktober 2013, 11:12:26 schrieben Sie:
Wolfgang Walter wine@stwm.de wrote:
../../../tools/runtest -q -P wine -T ../../.. -M kernel32.dll -p kernel32_test.exe.so comm.c && touch comm.ok comm.c:860: Test failed: WaitCommEvent failed with a timeout comm.c:881: Test failed: WaitCommEvent error 997 comm.c:882: Test failed: WaitCommEvent: expected EV_TXEMPTY, got 0 comm.c:887: Test failed: WaitCommEvent used 1003 ms for waiting comm.c:2226: Tests skipped: interactive tests (set WINETEST_INTERACTIVE=1) make: *** [comm.ok] Error 4
This is because the previous test fails: in the previous test wine actually write to the serial device and does not return with ERROR_INVALID_PARAMETER.
What is this "previous test" you are talking about? Obviously there is no a failing test which checks for ERROR_INVALID_PARAMETER in the output posted by Alexandre above. And it's worth to mention that these tests pass without failures here with and without an external hardware turned on (with the patch applied).
With privious test I mean the test which starts at line 836:
S(U(ovl_write)).Offset = 0; S(U(ovl_write)).OffsetHigh = 0; ovl_write.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); before = GetTickCount(); SetLastError(0xdeadbeef); res = WriteFile(hcom, tbuf, sizeof(tbuf), &bytes, &ovl_write); after = GetTickCount(); todo_wine ok(!res && GetLastError() == ERROR_IO_PENDING, "WriteFile returned %d, error %d\n", res, GetLastError()); todo_wine ok(!bytes, "expected 0, got %u\n", bytes); ok(after - before < 30, "WriteFile took %d ms to write %d Bytes at %d Baud\n", after - before, bytes, baud); /* don't wait for WriteFile completion */
This tests sends 17 bytes but does not wait till all have been sent. So the next test which fails under wine (comm.c:860: Test failed: WaitCommEvent failed with a timeout) does not start with a empty tx queue. There should be a sleep(TIMEOUT) after this test.
The test for ERROR_INVALID_PARAMETER before that one (starting at line 831) does indeed not contribute any more to
comm.c:860: Test failed: WaitCommEvent failed with a timeout
any more. When we discussed this it did because then the the code still was:
SetLastError(0xdeadbeef); res = WriteFile(hcom, tbuf, sizeof(tbuf), &bytes, NULL); todo_wine ok(!res, "WriteFile on an overlapped handle without ovl structure should fail\n"); todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
So then there were even more bytes pending in the tx queue.
Regards,