libfprint/tests
Daniel Schaefer 20f5ce682e tests: /usr/bin/env shebang
Not all distros have /usr/bin/python3. Using env is more portable.

Signed-off-by: Daniel Schaefer <git@danielschaefer.me>
2026-06-11 15:47:32 +00:00
..
aes2501 tests: Add aes2501 driver replay test 2021-09-08 15:25:14 +02:00
aes3500 tests: Add trailing newline to busname/devname sysfs attributes 2021-01-21 11:28:47 +00:00
egis0570 cleanup: Use allow/deny lists instead of color based ones 2024-02-13 15:19:47 +01:00
egis_etu905 egis_etu905: Add 1c7a:05ae and 1c7a:9201 fingerprint readers 2026-06-10 10:14:47 +02:00
egismoc tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
egismoc-05a1 tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
egismoc-0586 tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
egismoc-0587 tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
elan tests: Add trailing newline to busname/devname sysfs attributes 2021-01-21 11:28:47 +00:00
elan-cobo tests: Add (another) elan driver replay test 2021-09-08 15:36:35 +02:00
elanmoc tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
elanspi elanspi: Adjust register tables (fixes #438) 2021-12-22 00:20:57 -05:00
focaltech_moc tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
fpcmoc tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
goodixmoc tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
nb1010 Add nb1010 driver 2021-04-12 20:24:13 +02:00
realtek tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
realtek-5816 tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
synaptics tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
upektc_img tests: Add upektc_img test 2021-07-12 17:06:43 +02:00
upektc_img-tcs1s upektc_img: Add new unit test for the TCS1s chip variant 2023-01-17 19:50:21 +00:00
uru4000-4500 tests: Add U.are.U 4500 test 2021-09-09 10:54:48 +02:00
uru4000-msv2 tests: Add uru4000 test 2021-09-08 20:37:00 +02:00
vfs0050 tests: Add full USB device hierarchy 2021-08-09 16:08:21 +02:00
vfs301 tests: Add trailing newline to busname/devname sysfs attributes 2021-01-21 11:28:47 +00:00
vfs5011 tests: Add full USB device hierarchy 2021-08-09 16:08:21 +02:00
vfs7552 Added test for vfs7552 2021-03-12 11:29:43 +01:00
capture.py tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
create-driver-test.py.in tests: /usr/bin/env shebang 2026-06-11 15:47:32 +00:00
driver.test.in tests: Add support for installed tests 2023-06-28 16:35:16 +02:00
hwdb-check-unsupported.py ci: Add check that wiki and generator are in sync 2021-01-20 17:21:38 +01:00
libfprint.supp libfprint.supp: Ignore libusb context init potential leak 2025-02-13 18:52:24 +00:00
meson.build egis_etu905: Add 1c7a:05ae and 1c7a:9201 fingerprint readers 2026-06-10 10:14:47 +02:00
README.md tests: Run custom.py from test creation helper when available 2021-09-21 19:13:02 +02:00
test-device-fake.c test-device-fake: Add more logging showing the current device action 2022-10-13 20:31:28 +00:00
test-device-fake.h tests: Add suspend/resume tests 2021-08-09 16:08:21 +02:00
test-fp-context.c tests: Add support for creating other virtual readers 2021-01-20 23:21:04 +01:00
test-fp-device.c test-fp-device: Add few tests to check identification init errors 2022-07-14 21:35:30 +02:00
test-fpi-assembling.c tests: Use native GTest utils to generate assets names 2023-08-21 14:19:27 +00:00
test-fpi-device.c test-fpi-device: Only push pragma -wdanging-pointer in newer GCC versions 2023-03-15 15:23:17 +00:00
test-fpi-ssm.c ssm: Remove delayed action GCancellable integration 2021-04-28 22:16:37 +02:00
test-generated-hwdb.sh tests: make mktemp command call work with Chimera Linux's mktemp 2024-01-22 15:52:46 +00:00
test-utils.c virtual-device: Add non-image mock devices 2021-01-20 23:21:41 +01:00
test-utils.h virtual-device: Add non-image mock devices 2021-01-20 23:21:41 +01:00
test.in tests: Add support for installed tests 2023-06-28 16:35:16 +02:00
umockdev-test.py tests: Fix umockdev version detection 2022-08-16 17:14:07 +02:00
unittest_inspector.py tests: Make meson be aware of the single python unit tests 2020-02-10 11:41:40 +01:00
valgrind-python.supp tests/valgrind-python.supp: Ignore PyGObject leaks 2026-02-10 06:33:00 +01:00
virtual-device.py tests/virtual-device: Check that removed devices are not in context anymore 2023-06-23 18:20:04 +02:00
virtual-image.py tests/virtual-image: Use sleep multiplier when running under valgrind 2025-02-13 18:46:15 +01:00

umockdev Tests

umockdev tests use fingerprint devices mocked by umockdev toolchain.

This document describes how to create test cases (for USB devices). Many of these tests are tests for image devices, where a single image is captured and stored.

Other kinds of umockdev tests can be created in a similar manner. For match-on-chip devices you would instead create a test specific custom.py script, capture it and store the capture to custom.pcapng.

'capture' and 'custom' Test Creation

For image devices the capture.py script will be used to capture one reference image. If the driver is a non-image driver, then a custom.py script should be created in advance, which will be run instead.

  1. Make sure that libfprint is built with support for the device driver that you want to create a test case for.

  2. From the build directory, run tests/create-driver-test.py as root. Note that if you're capturing data for a driver which already has a test case but the hardware is slightly different, you might want to pass a variant name as a command-line options, for example:

$ sudo tests/create-driver-test.py driver [variant]
  1. If the capture is not successful, run the tool again to start another capture.

  2. Add driver test name to drivers_tests in the meson.build, as instructed, and change the ownership of the just-created test directory in the source.

  3. Check whether meson test passes with this new test.

Note. To avoid submitting a real fingerprint when creating a 'capture' test, the side of finger, arm, or anything else producing an image with the device can be used.

Possible Issues

Other changes may be needed to get everything working. For example the elan driver relies on a timeout that is not reported correctly. In this case the driver works around it by interpreting the protocol error differently in the virtual environment (by means of FP_DEVICE_EMULATION environment variable).