On Tue, Jul 20, 2021 at 01:09:25PM +0200, Francois Gouget wrote:
On Thu, 8 Jul 2021, Marvin wrote: [...]
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=93874
[...]
=== w8adm (32 bit report) ===
dinput: device.c:374: Test failed: keydown for D did not register
This is a new random failure that happens on the w8 VM:
https://test.winehq.org/data/patterns.html#dinput:device
Could you look into it?
Hey,
Yes. I am already looking into this + other flaky dinput tests that fail in a similar way.
Turns out that on Windows dinput sometimes just drops key events injected via SendInput() / keybd_event().
I've tried many things like throttling the rate of the events or trying to repeat them multiple times if we didn't get anything but when running the tests in a loop eventually we will be unlucky and the test will fail.
The only reliable solution seems to be checking if the device has received any data via GetDeviceData(), and if we don't see any events there then we can win_skip(). AFAIU it will fail under Wine but just skip on Windows.
The tests would still have sporadic skips and I am not sure if this is any better than sporadic failures. Do we track those? This also creates room for breaking tests on Window without noticing...