[PATCH 2/5] wait until all data from earlier test has been written in test_waittxempty
wine at stwm.de
Thu Sep 5 05:26:29 CDT 2013
Am Donnerstag, 5. September 2013, 18:55:55 schrieben Sie:
> Wolfgang Walter <wine at stwm.de> wrote:
> > > > > > + if (res || (!res && GetLastError() == ERROR_IO_PENDING))
> > > > > > + /* if data has been sent: wait for termination */
> > > > > > + Sleep(timeout);
> > > > >
> > > > > I don't see such a problem with real COM-port and serial-USB cable
> > > > > under Windows or Linux here and under testbot VMs.
> > > >
> > > > Wine does that here (vanilla). I added this so that the NEXT test does
> > > > not
> > > > depend what wine exactly does.
> > >
> > > When Wine behaviour differs from Windows one the test results need to be
> > > marked as todo_wine, and such places already have it.
> > I don't unterstand you. I didn't change the test case. It still above and
> > is still marked with todo.
> There is no need to add any workarounds for Wine bugs, appropriate places
> already have todo_wine statements.
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);
ok(!res, "WriteFile on an overlapped handle without ovl structure should fail\n");
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.
Anstalt des öffentlichen Rechts
More information about the wine-devel