Commit 65f890a3 authored by Peter Hutterer's avatar Peter Hutterer

test: abort when we detect a touch jump during the tests

We never want to accidentally trigger this one. Where we trigger them on
purpose, we can swap the log handler out first.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 7768d7d9
Pipeline #3609 passed with stages
in 6 minutes and 48 seconds
......@@ -622,6 +622,10 @@ litest_log_handler(struct libinput *libinput,
!strstr(format, "offset negative"))
litest_abort_msg("libinput bug triggered, aborting.\n");
}
if (strstr(format, "Touch jump detected and discarded")) {
litest_abort_msg("libinput touch jump triggered, aborting.\n");
}
}
static char *
......
......@@ -1926,6 +1926,7 @@ START_TEST(touchpad_3fg_tap_slot_release_btntool)
msleep(2);
/* touch 2 up, coordinate jump + ends slot 1, TRIPLETAP stays */
litest_disable_log_handler(li);
litest_event(dev, EV_ABS, ABS_MT_SLOT, 0);
litest_event(dev, EV_ABS, ABS_MT_POSITION_X, 2500);
litest_event(dev, EV_ABS, ABS_MT_POSITION_Y, 3800);
......@@ -1955,6 +1956,7 @@ START_TEST(touchpad_3fg_tap_slot_release_btntool)
litest_event(dev, EV_ABS, ABS_PRESSURE, 78);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
libinput_dispatch(li);
litest_restore_log_handler(li);
/* now end all three */
litest_event(dev, EV_ABS, ABS_MT_SLOT, 0);
......
......@@ -5350,6 +5350,7 @@ START_TEST(touchpad_tool_tripletap_touch_count_late)
msleep(10);
/* touch 2 up, coordinate jump + ends slot 1, TRIPLETAP stays */
litest_disable_log_handler(li);
litest_event(dev, EV_ABS, ABS_MT_SLOT, 0);
litest_event(dev, EV_ABS, ABS_MT_POSITION_X, 4000);
litest_event(dev, EV_ABS, ABS_MT_POSITION_Y, 4000);
......@@ -5383,6 +5384,7 @@ START_TEST(touchpad_tool_tripletap_touch_count_late)
litest_event(dev, EV_SYN, SYN_REPORT, 0);
libinput_dispatch(li);
msleep(10);
litest_restore_log_handler(li);
/* now a click should trigger middle click */
litest_event(dev, EV_KEY, BTN_LEFT, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment