From e77239f0c72e3c2d5dce39385b1ffd98c1e07d6c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Jun 2025 16:03:56 +1000 Subject: [PATCH] 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: --- test/litest-device-anker-mouse-kbd.c | 1 + test/test-device.c | 1 + 2 files changed, 2 insertions(+) diff --git a/test/litest-device-anker-mouse-kbd.c b/test/litest-device-anker-mouse-kbd.c index dfb6ffba..118e59f3 100644 --- a/test/litest-device-anker-mouse-kbd.c +++ b/test/litest-device-anker-mouse-kbd.c @@ -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, diff --git a/test/test-device.c b/test/test-device.c index a1cc66c7..b8872eaa 100644 --- a/test/test-device.c +++ b/test/test-device.c @@ -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);