Am Donnerstag, 5. September 2013, 19:40:13 schrieb Dmitry Timoshkov: > Wolfgang Walter <w...@stwm.de> wrote: > > This is not a work around. > > > > todo_wine will not magically undo sending the bytes. > > Please explain why you think that there will be now pending > > bytes in the tx buffer if the tests fails. > > > > And why it does not make the next tests fail even if wine would > > behave correctly then. > > > > 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());> > > both tests would fail with wine actually. Wine does write 17 bytes to > > com port these bytes now sit in tx buffer and need some time sending. > > This distorts the following tests which tests the EV_TXEMPTY behaviour: > > > > Again 17 bytes are written and then the tests assume that one waits > > for these 17 bytes (timeout value and messurement). > > But really we wait for much more bytes being sent, up to 36. > > > > So even if EV_TXEMPTY handling would work the test for it will fail with a > > timeout. > Does 'make test' pass without failures for you?
Without patch 1/2 and 2/2 I get for $ ../../../tools/runtest -P wine -M kernel32.dll -T ../../.. -q -p kernel32_test.exe.so comm.c fixme:comm:set_queue_size insize 1024 outsize 1024 unimplemented stub err:comm:set_line_control ByteSize fixme:ntdll:server_ioctl_file Unsupported ioctl 1b000c (device=1b access=0 func=3 method=0) comm.c:2029: Tests skipped: interactive tests (set WINETEST_INTERACTIVE=1) With my patches 1/2 and 2/2 I get: fixme:iphlpapi:NotifyAddrChange (Handle 0x10ee8e0, overlapped 0x10ee8ec): stub wine: configuration in '/home/walterw/.wine' has been updated. fixme:comm:set_queue_size insize 1024 outsize 1024 unimplemented stub comm.c:857: Test succeeded inside todo block: WaitCommEvent failed with a timeout comm.c:881: Test succeeded inside todo block: WaitCommEvent error 997 comm.c:883: Test succeeded inside todo block: WaitCommEvent: expected EV_TXEMPTY, got 0x4 comm.c:889: Test succeeded inside todo block: WaitCommEvent used 1141 ms for waiting err:comm:set_line_control ByteSize fixme:ntdll:server_ioctl_file Unsupported ioctl 1b000c (device=1b access=0 func=3 method=0) comm.c:2036: Tests skipped: interactive tests (set WINETEST_INTERACTIVE=1) So EV_TXEMPTY handling already works partially. 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); Then the tests 857 etc. again fail. We already talked about why that is the case. Probably I should add that as an additional test. Regards, -- Wolfgang Walter Studentenwerk München Anstalt des öffentlichen Rechts Abteilungsleiter IT Leopoldstraße 15 80802 München