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: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1284>
This commit is contained in:
Peter Hutterer 2025-08-01 12:52:04 +10:00 committed by Marge Bot
parent 68dbb98f04
commit 465fce9128

View file

@ -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;