libinput test suite

The libinput test suite is based on Check and runs automatically during make check.

# Permissions required to run tests

Most tests require the creation of uinput devices and access to the resulting /dev/input/eventX nodes. Some tests require temporary udev rules. This usually requires the tests to be run as root.

# Selective running of tests

litest's tests are grouped by test groups and devices. A test group is e.g. "touchpad:tap" and incorporates all tapping-related tests for touchpads. Each test function is (usually) run with one or more specific devices. The --list commandline argument shows the list of suites and tests.

$./test/test-device --list device:wheel: wheel only blackwidow device:invalid devices: no device device:group: no device logitech trackball MS surface cover mouse_roccat wheel only blackwidow ... In the above example, the "device:wheel" suite is run for the "wheel only" and the "blackwidow" device. Both devices are automatically instantiated through uinput by litest. The "no device" entry signals that litest does not instantiate a uinput device for a specific test (though the test itself may instantiate one). The --filter-test argument enables selective running of tests through basic shell-style function name matching. For example:$ ./test/test-touchpad --filter-test="*1fg_tap*"

The --filter-device argument enables selective running of tests through basic shell-style device name matching. The device names matched are the litest-specific shortnames, see the output of --list. For example:

$./test/test-touchpad --filter-device="synaptics*" The --filter-group argument enables selective running of test groups through basic shell-style test group matching. The test groups matched are litest-specific test groups, see the output of --list. For example:$ ./test/test-touchpad --filter-group="touchpad:*hover*"

The --filter-device and --filter-group arguments can be combined with --list to show which groups and devices will be affected.

# Controlling test output

Each test supports the --verbose commandline option to enable debugging output, see libinput_log_set_priority() for details. The LITEST_VERBOSE environment variable, if set, also enables verbose mode.

$./test/test-device --verbose$ LITEST_VERBOSE=1 make check