mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 21:00:06 +01:00
test: fix two race conditions waiting for proximity events
This test does a prox in/out and immediately drains events. Where we are slow enough we may drain only one (or none) of the proximity events which causes a failure later in the test. Similar issue with the second test where we may get a delayed tip event. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1074>
This commit is contained in:
parent
2b2959fc8b
commit
2ac4227843
1 changed files with 3 additions and 0 deletions
|
|
@ -3775,6 +3775,7 @@ START_TEST(tablet_calibration_set_matrix_delta)
|
|||
dy = libinput_event_tablet_tool_get_y(tablet_event) - y;
|
||||
libinput_event_destroy(event);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
litest_drain_events(li);
|
||||
|
||||
status = libinput_device_config_calibration_set_matrix(d,
|
||||
|
|
@ -3857,6 +3858,8 @@ START_TEST(tablet_calibration_set_matrix)
|
|||
litest_dispatch(li);
|
||||
litest_tablet_proximity_in(dev, 50, 50, axes);
|
||||
litest_tablet_proximity_out(dev);
|
||||
litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
|
||||
litest_drain_events(li);
|
||||
|
||||
calibration[0] = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue