From 465fce912847e7656d8a94e8e2c469b1e46f705f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 1 Aug 2025 12:52:04 +1000 Subject: [PATCH] test: don't run the check for lowres events if we don't have hires events This test explicitly checks for devices only sending REL_WHEEL but *not* REL_WHEEL_HI_RES. But that check only needs to run if the device has the HI_RES axis. The test device with REL_WHEEL_HI_RES disabled via quirk needs to be special-cased since we cannot detect this in the test suite otherwise. Part-of: --- test/test-pointer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test-pointer.c b/test/test-pointer.c index e6379321..d1ae27c2 100644 --- a/test/test-pointer.c +++ b/test/test-pointer.c @@ -828,7 +828,10 @@ START_TEST(pointer_scroll_wheel_hires_send_only_lores) litest_abort_msg("Invalid test axis '%d'", axis); } - if (!libevdev_has_event_code(dev->evdev, EV_REL, lores_code) && + if (dev->which == LITEST_MOUSE_WHEEL_HIRES_DISABLED) + return LITEST_NOT_APPLICABLE; + + if (!libevdev_has_event_code(dev->evdev, EV_REL, lores_code) || !libevdev_has_event_code(dev->evdev, EV_REL, hires_code)) return LITEST_NOT_APPLICABLE;