test: tighten the wakeup-on-key lid test
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 22 May 2017 04:21:40 +0000 (14:21 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 23 May 2017 03:03:42 +0000 (13:03 +1000)
Having a litest_wait_for_event_of_type() in there causes us to silently
discard anything but the events we're looking for. This is risky, we want to
make sure that if we re-enable the lid that the key events arrive *after* the
lid open event, not before. So let's not paper over those.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/test-lid.c

index 52542224b4722af5d51590fea40dfd00831015a6..1bd75cb6da3086d17e962bc1c2bc00d27f22dd42 100644 (file)
@@ -360,7 +360,6 @@ START_TEST(lid_open_on_key)
        litest_event(keyboard, EV_SYN, SYN_REPORT, 0);
        libinput_dispatch(li);
 
-       litest_wait_for_event_of_type(li, LIBINPUT_EVENT_SWITCH_TOGGLE, -1);
        event = libinput_get_event(li);
        litest_is_switch_event(event,
                               LIBINPUT_SWITCH_LID,