kernel32/tests: Fix the test_waittxempty() timeout.

Francois Gouget fgouget at free.fr
Tue Oct 1 10:53:29 CDT 2013


On Tue, 1 Oct 2013, Francois Gouget wrote:
[...]
> The timeout was too short and would only work for UARTs that have a 
> FIFO and where the trigger level was set just right. With this patch 
> we calculate how much time sending the test data will actually take 
> and tack on a small margin to take into account scheduling delays.

I should note that this does not fix the test failuers on the QEmu VMs, 
specifically the WineTestBot ones.
If QEmu 1.1.2 is anything like QEmu 1.6.0, then the serial port seems to 
operate at a fixed speed of about 1800000bps. This is so out of line 
with the 150bps that we request that it causes the test to fail.


[...]
>  * Windows reports that all bytes have been sent not when the UART's 
>    buffer is empty but when they all made it to the UART's buffer. Note 
>    that this can be tested (see next mail).

And here is this test. IT IS NOT MEANT TO BE COMMITTED.
(but seeing the WineTestBot results would still be interesting)

On my one Windows PC with a real UART (Intel(R) 82801DBM LPC Interface 
Controller - 24CC, i.e. ICH4 which emulates a 16550A UART) I get the 
following results which clearly illustrate the impact of the 
FIFO/trigger level.

comm.c:1100: WaitCommEvent(1 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(2 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(3 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(4 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(5 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(6 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(7 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(8 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(9 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(10 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(11 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(12 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(13 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(14 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(15 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(16 bytes) for EV_TXEMPTY took 872 ms
comm.c:1100: WaitCommEvent(17 bytes) for EV_TXEMPTY took 872 ms
comm.c:1100: WaitCommEvent(18 bytes) for EV_TXEMPTY took 872 ms
comm.c:1100: WaitCommEvent(19 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(20 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(21 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(22 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(23 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(24 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(25 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(26 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(27 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(28 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(29 bytes) for EV_TXEMPTY took 1802 ms
comm.c:1100: WaitCommEvent(30 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(31 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(32 bytes) for EV_TXEMPTY took 1802 ms
comm.c:1100: WaitCommEvent(33 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(34 bytes) for EV_TXEMPTY took 1802 ms
comm.c:1100: WaitCommEvent(35 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(36 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(37 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(38 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(39 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(40 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(41 bytes) for EV_TXEMPTY took 1802 ms
comm.c:1100: WaitCommEvent(42 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(43 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(44 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(45 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(46 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(47 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(48 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(49 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(50 bytes) for EV_TXEMPTY took 2734 ms


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
                          "Utilisateur" (nom commun) :
        Mot utilisé par les informaticiens en lieu et place d'"idiot".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triggerlevel.diff
Type: text/x-diff
Size: 6183 bytes
Desc: triggerlevel.diff
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20131001/9b921c8e/attachment.diff>


More information about the wine-devel mailing list