server: Add support for pending write flag to the serial device. Take 2.

Dmitry Timoshkov dmitry at baikal.ru
Wed Oct 23 04:41:15 CDT 2013


Wolfgang Walter <wine at stwm.de> wrote:

> 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.

That's the point of the test.

> 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.

State of the queue doesn't matter at all, the patch (which is the subject of
this message) is supposed to make this test work in all cases.

-- 
Dmitry.



More information about the wine-devel mailing list