libfprint/tests
Benjamin Berg df41ed56f6 meson: Use source_root() to not require meson 0.56
This fixes the flatpak build.
2021-09-15 15:43:33 +02: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 tests: Add test for egistec0570 2021-07-08 13:42:22 +02: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 elanmoc: Adjustments to protocol change (passing an empty user ID) 2021-08-10 16:22:54 +08:00
elanspi tests: Add capture test for elanspi 2021-06-23 20:42:52 +00:00
goodixmoc device: Expose supported features publicly as FpDeviceFeature 2021-04-12 22:14:06 +02:00
nb1010 Add nb1010 driver 2021-04-12 20:24:13 +02:00
synaptics tests: Use pcap recording for synaptics and test clear_storage 2021-06-17 14:35:47 +02:00
upektc_img tests: Add upektc_img test 2021-07-12 17:06:43 +02: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 device: Expose supported features publicly as FpDeviceFeature 2021-04-12 22:14:06 +02:00
create-driver-test.py.in tests: Simplify capture of driver behaviour for regression tests 2021-09-15 13:24:08 +00:00
hwdb-check-unsupported.py ci: Add check that wiki and generator are in sync 2021-01-20 17:21:38 +01:00
meson.build meson: Use source_root() to not require meson 0.56 2021-09-15 15:43:33 +02:00
README.md tests: Simplify capture of driver behaviour for regression tests 2021-09-15 13:24:08 +00:00
test-device-fake.c tests: Add suspend/resume tests 2021-08-09 16:08:21 +02: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 device: Deprecate fp_device_{supports,has}_* functions for has_feature 2021-04-12 22:14:06 +02:00
test-fpi-assembling.c assembling: Fix copying only partial tile on overhang 2021-06-23 22:33:07 +02:00
test-fpi-device.c tests: Add suspend/resume tests 2021-08-09 16:08:21 +02:00
test-fpi-ssm.c ssm: Remove delayed action GCancellable integration 2021-04-28 22:16:37 +02:00
test-generated-hwdb.sh test-generated-hwdb: Just use diff to compare for being more informative 2021-01-21 15:55:44 +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
umockdev-test.py tests: Add uru4000 test 2021-09-08 20:37:00 +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: Add setup mode to run tests using valgrind 2019-11-27 21:40:43 +01:00
virtual-device.py virtual-device: Return empty no-match if unknown SCAN id is passed 2021-08-19 18:59:38 +02:00
virtual-image.py tests: Use native meson exec wrapper in test setups instead of our script 2021-04-13 19:38:58 +02:00

umockdev Tests

umockdev tests use fingerprint devices mocked by umockdev toolchain.

This document describes how to create a 'capture' test: a test that captures a picture of a fingerprint from the device (mocked by umockdev) and compares it with the standard one.

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' Test Creation

A new 'capture' test is created by means of capture.py script:

  1. Make sure that libfprint is built with support for the device driver that you want to capture 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, 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).