test: update a test for current kernels

This device was added before high-res scroll events existing in the
kernel and it's used in a test to verify that a device that has
ABS_MT_POSITION_X but not _Y doesn't get automatically ignored.

Said test (device_quirks_no_abs_mt_y) uses a wheel event to verify that
we do get events from this device.

Since then we've long had kernels that support hi-res scrolling and the
kernel takes care of those events for us. So let's update the device
description and the events we send to include the high-resolution
events. That doesn't change the validity of the test but stops it from
becoming a false positive.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1251>
This commit is contained in:
Peter Hutterer 2025-06-27 16:03:56 +10:00 committed by Marge Bot
parent 17731d415d
commit e77239f0c7
2 changed files with 2 additions and 0 deletions

View file

@ -39,6 +39,7 @@ static struct input_id input_id = {
/* clang-format off */
static int events[] = {
EV_REL, REL_HWHEEL,
EV_REL, REL_HWHEEL_HI_RES,
EV_KEY, KEY_ESC,
EV_KEY, KEY_KPMINUS,
EV_KEY, KEY_KPPLUS,

View file

@ -1286,6 +1286,7 @@ START_TEST(device_quirks_no_abs_mt_y)
litest_drain_events(li);
litest_event(dev, EV_REL, REL_HWHEEL, 1);
litest_event(dev, EV_REL, REL_HWHEEL_HI_RES, 120);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
litest_dispatch(li);