Commit graph

12 commits

Author SHA1 Message Date
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
df527b07b4 path: limit path device nodes to PATH_MAX characters
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
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
2e4895b888 Add safe_strdup()
Return value is either NULL or a strdup'd string, depending on the input
value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-12 15:39:31 +10:00
Peter Hutterer
7b5ca6204b Fix a few things scan-build complains about
Uninitialized variables, potential NULL dereferences, dead assignments and an
unused return value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 10:37:58 +10:00
Peter Hutterer
b64f2382f7 test: localise the open/close function counter in the path tests
Reduces the chance of interference between tests.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-09 14:28:19 +10:00
Peter Hutterer
dcbf2c2a44 test: don't leak test warnings to stdout
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-02 10:53:50 +10:00
Peter Hutterer
4e7db651ce test: add a test to force a destroy for the path backend
The test suite (and tests) we have now all clean up nicely before calling the
final libinput_unref(). Add one where there's at least one device still
connected.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-20 10:35:44 +10:00
Peter Hutterer
0a34ed409e test: add test for invalid udev_assign_seat on path context
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-20 10:35:43 +10:00
Peter Hutterer
9483a7a2c0 test: simplify some checks in the path test
The first event is always a device added event, skip the loops that would
paper over this. If we ever change this, the tests *should* fail.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-17 07:53:49 +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/path.c (Browse further)