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

Wolfgang Walter wine at stwm.de
Wed Oct 23 06:27:19 CDT 2013


Am Mittwoch, 23. Oktober 2013, 18:41:15 schrieben Sie:
> 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.

I have no intention to discuss that all again. Please think about the problem. 
Hint: writing twice as many bytes with 150 baud needs more time, significantly 
more time then TIMEOUT.

Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts



More information about the wine-devel mailing list