Commit graph

10 commits

Author SHA1 Message Date
weizhixiang
c00c5cb691 replace strncmp with strneq for safety-check
Signed-off-by: weizhixiang <weizhixiang@uniontech.com>
2021-03-08 20:59:20 +00:00
Peter Hutterer
d3115f4875 test: drop the custom group names
The group names are forced by check (they are called suite names there) but
for our test suite they provide very little benefit. Much easier to just
use the filename a test is in as group name.

This removes the pure substring match for --filter-group, it's now fnmatch
only. group names are short enough that the typing isn't an issue and we don't
want to run tests twice (e.g. 'pad' is also in 'touchpad').

This patch caused #574 until it got fixed in d838e3a3a4

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-02-12 15:24:15 +10:00
Peter Hutterer
9b18adc407 test: replace != NULL checks with ck_assert_notnull
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-15 08:42:15 +10:00
Peter Hutterer
1228fab87b test: check for a non-null libinput in the new udev_create_seat_too_long test
Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-15 08:38:02 +10:00
Peter Hutterer
4353ed9152 udev: restrict the seat ID to 256 characters
Anything longer than that is likely a bug.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-11 03:35:53 +00:00
Peter Hutterer
ce80e40006 test: move all the _setup() functions into a special section
This way we can loop through them instead of having to add them manually.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:17:52 +10:00
Peter Hutterer
63880d6e1b udev: fix segfault when resuming before assigning a seat
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-16 16:57:30 +10:00
Peter Hutterer
00272cfbb1 Add support for LIBINPUT_IGNORE_DEVICE
The recommended way to have libinput ignore specific devices so far was to
remove the ID_INPUT* properties from the device. That may also affect other
pieces of the stack that need access to this device.

For the niche case of a device that should only be ignored by libinput but
otherwise be treated normally by the system, we now support the
LIBINPUT_IGNORE_DEVICE property.

If the property is set to "0", it's equivalent to being unset. This gets
around some technical limitations in udev where unsetting a property is
impossible via a hwdb entry.

https://bugs.freedesktop.org/show_bug.cgi?id=102229

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-23 14:56:51 +10:00
Peter Hutterer
7c6784dd81 test: add test for invalid path operations on udev backends
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-20 10:35:43 +10:00
Peter Hutterer
5d66edc9f4 test: prefix all test source files with "test-"
They weren't originally prefixed but the various tests were, but now that we
only have one test runner binary anyway, the prefix helps sorting the files
easily within e.g. gcov results.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-16 08:59:00 +10:00
Renamed from test/udev.c (Browse further)