mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-08 07:48:03 +02:00
test: use litest_wait_for_event() for the lid switch events
Getting spurious test case failures in these two tests but they're not easily reproducible. One cause may be a slight delay of the event that we're writing to the kernel device. If that has a minor delay, we'll miss it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
fca003d305
commit
6f447cb8de
1 changed files with 2 additions and 2 deletions
|
|
@ -691,7 +691,7 @@ START_TEST(lid_update_hw_on_key)
|
||||||
litest_event(keyboard, EV_SYN, SYN_REPORT, 0);
|
litest_event(keyboard, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_drain_events(li);
|
litest_drain_events(li);
|
||||||
|
|
||||||
libinput_dispatch(li2);
|
litest_wait_for_event(li2);
|
||||||
event = libinput_get_event(li2);
|
event = libinput_get_event(li2);
|
||||||
litest_is_switch_event(event,
|
litest_is_switch_event(event,
|
||||||
LIBINPUT_SWITCH_LID,
|
LIBINPUT_SWITCH_LID,
|
||||||
|
|
@ -798,7 +798,7 @@ START_TEST(lid_update_hw_on_key_multiple_keyboards)
|
||||||
litest_event(keyboard2, EV_SYN, SYN_REPORT, 0);
|
litest_event(keyboard2, EV_SYN, SYN_REPORT, 0);
|
||||||
litest_drain_events(li);
|
litest_drain_events(li);
|
||||||
|
|
||||||
libinput_dispatch(li2);
|
litest_wait_for_event(li2);
|
||||||
event = libinput_get_event(li2);
|
event = libinput_get_event(li2);
|
||||||
litest_is_switch_event(event,
|
litest_is_switch_event(event,
|
||||||
LIBINPUT_SWITCH_LID,
|
LIBINPUT_SWITCH_LID,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue