test: fix a multitap test expecting one tap too few
authorsatrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
Fri, 22 Nov 2019 14:36:24 +0000 (15:36 +0100)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 26 Nov 2019 02:34:44 +0000 (02:34 +0000)
The problem was masked by a missing timeout, causing one up / down pair to not yet be enqueued before reading the queue.

test/test-touchpad-tap.c

index cfb3dd4..2f6d8a5 100644 (file)
@@ -3498,7 +3498,10 @@ START_TEST(touchpad_tap_palm_multitap_down_again)
                msleep(10);
        }
 
-       for (ntaps = 0; ntaps <= 2 * range; ntaps++) {
+       litest_timeout_tap();
+       libinput_dispatch(li);
+
+       for (ntaps = 0; ntaps <= 2 * range + 1; ntaps++) {
                litest_assert_button_event(li,
                                           BTN_LEFT,
                                           LIBINPUT_BUTTON_STATE_PRESSED);