From 30c6d5983db69ece5c3a94f837beaa9d736e9a4c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Mar 2024 09:14:53 +1000 Subject: [PATCH] test: add two more more libinput_dispatch() calls We're writing a lot of events here, if the system isn't fast enough or (in the future) if we have a custom socket instead of a kernel device we might fill up the write buffer, causing the test to fail. Easy workaround is to dispatch more often to ensure the data is being read from the fd. Part-of: --- test/test-touchpad.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test-touchpad.c b/test/test-touchpad.c index ccfd125d..6d5436a2 100644 --- a/test/test-touchpad.c +++ b/test/test-touchpad.c @@ -3723,6 +3723,7 @@ START_TEST(touchpad_fingers_down_before_init) break; litest_touch_move(dev, i, 20 + 10 * i + x, 30); } + libinput_dispatch(li); } libinput_dispatch(li); litest_assert_empty_queue(li); @@ -3733,6 +3734,7 @@ START_TEST(touchpad_fingers_down_before_init) } else { litest_event(dev, EV_KEY, map[finger_count], 0); } + libinput_dispatch(li); } litest_assert_empty_queue(li);