test: reduce the default abs-max range to avoid ENOMEM
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 7 Apr 2016 05:44:23 +0000 (15:44 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 14 Apr 2016 04:51:46 +0000 (14:51 +1000)
This path is hit when we set up an abs device without setting specific axis
ranges. Usually because we only care that the axis is there, not the values,
see the tests of invalid devices.

0xffff is fine as max for most axes but setting it for ABS_MT_SLOT can cause
allocation errors. Reduce to 100 because we don't care about the range anyway
and 100 is still big enough for basic tests.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c420747be49cb6505b62a0700dbc3dc998c0862b)

test/litest.c

index f679652f970f517458136e4e9ce4159b5adbe709..8ac9f1d3a1bcd6ced037af5f8822e5b715aa69f0 100644 (file)
@@ -2057,7 +2057,7 @@ litest_create_uinput(const char *name,
        const struct input_absinfo default_abs = {
                .value = 0,
                .minimum = 0,
-               .maximum = 0xffff,
+               .maximum = 100,
                .fuzz = 0,
                .flat = 0,
                .resolution = 100