Commit Graph

62 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño) e4ef2ed7a0 tests: Do add TOD testing for SSM API
Driver is coming from the TOD drivers testing project [1].

https://gitlab.freedesktop.org/3v1n0/libfprint-tod-test-drivers
2021-09-03 19:41:17 +02:00
Marco Trevisan (Treviño) 29b904b93d tests: Add versions check on TOD drivers based on their IDs
Recompile tod drivers using libfprint-tod-test-drivers project [1] so
that we don't have to reorder the private driver structure, plus use a
versioned driver ID and parse it to check whether a feature is supported
for such TOD test driver.

https://gitlab.freedesktop.org/3v1n0/libfprint-tod-test-drivers
2021-09-03 19:41:17 +02:00
Marco Trevisan (Treviño) 4ed67f9084 build: Use host machine family from meson 2021-09-02 13:23:30 +02:00
Marco Trevisan (Treviño) 2e00b03a43 Merge tag 'v1.94.0' into tod
Tag 1.94.0

Git-EVTag-v0-SHA512: 7cf9d7defb02433140f575589099569a5848ab34e8ecb0a4a90bb3c9eb1c228a16438afe1b23c381b59c1506f189a845752fead3dbd3c1c11f686cf47302cb1b
2021-08-28 02:19:40 +02:00
Benjamin Berg d6b4adec73 tests: Add upektc_img test 2021-07-12 17:06:43 +02:00
Saeed/Ali Rk a07011bac2 tests: Add test for egistec0570 2021-07-08 13:42:22 +02:00
Benjamin Berg 29048c51db tests: Add elanmoc CI test 2021-07-07 13:35:59 +02:00
Benjamin Berg dbd89929b9 tests: Increase timeout of umockdev tests
The new elanspi driver in particular needs a lot of ioctl's during the
test. On a normal machine, this would run quite quickly (less than 5s),
however, in busy CI environments this can take longer than 30s, causing
timeouts currently.

Increase the timeout from 10s to 15s. For CI this means the timeout now
is 45s which is hopefully enough.
2021-06-25 08:39:17 +00:00
Bastien Nocera 01663c1fb5 tests: Allow multiple tests per driver
Allow multiple tests per driver by using the first section of the
directory name, before the separating '-', as the driver name.
2021-06-25 10:23:42 +02:00
Matthew Mirvish 059ab65081 tests: Add capture test for elanspi 2021-06-23 20:42:52 +00:00
Marco Trevisan (Treviño) 81ecee3ead tests/tod-drivers: Add newly supported types 2021-04-13 22:35:34 +02:00
Marco Trevisan (Treviño) 20ac5c10a4 Merge branch 'origin/master' into tod 2021-04-13 22:17:37 +02:00
Marco Trevisan (Treviño) 58756ab62e tests: Ensure that we don't break ABI with expected TODv1 structures
We can check whether each relevant structure element has not changed and
that the supported enum and flag values didn't change value.
2021-04-13 22:14:56 +02:00
Marco Trevisan (Treviño) 9a1dcaa801 tests: Use native meson exec wrapper in test setups instead of our script
No need to provide a script that will break usage of `meson test --gdb`
when we can use a native and cleaner alternative.

We can then ignore LIBFPRINT_TEST_WRAPPER in basic tests, while it is
still needed by umockdev tests.
2021-04-13 19:38:58 +02:00
Huan Wang 355957919e Add nb1010 driver 2021-04-12 20:24:13 +02:00
Julius Piso 47223e551f Added test for vfs7552 2021-03-12 11:29:43 +01:00
Marco Trevisan (Treviño) 5804b25806 Merge libfprint/libfprint master branch into tod 2021-02-22 19:12:51 +01:00
Marco Trevisan (Treviño) 31541edc58 tests/virtual-device: Use a sleep multiplier when under valgrind 2021-01-26 16:54:14 +01:00
Benjamin Berg 8ded064e65 tests: Add test based on the new virtual devices
Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
2021-01-20 23:21:41 +01:00
Benjamin Berg 3f7a638eed virtual-device: Add non-image mock devices
There are two variants one with storage and identify support and the
other without storage.

It implements the following commands:
 * INSERT id
 * REMOVE id
 * SCAN id
 * ERROR error-code
 * LIST (returns saved print)

The INSERT/REMOVE/LIST commands are only available in the storage
driver. The SCAN command emulates presenting a finger.

These commands can be send ahead of time, and will be queued and
processed when appropriate. i.e. for INSERT/REMOVE that is immediately
when possible, for SCAN/ERROR processing is delayed.

The LIST command is always processed immediately.

Note that only a single command can be send per socket connection and
the command must be send in a single message. The socket will be closed
after the command has been processed.

Co-authored-by: Bastien Nocera <hadess@hadess.net>
Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
2021-01-20 23:21:41 +01:00
Marco Trevisan (Treviño) 533180a2e6 data: Use auto-generated but hardcoded autosuspend hwdb file
This solves various problems:
 1. It stays the same also if some drivers have been disabled
 2. It uses a stable path for being imported by systemd
 3. It is still checked for its validity by tests
 4. It can be auto-generated using a simple command
2021-01-20 21:17:42 +01:00
Marco Trevisan (Treviño) 99c269b3fe meson: Do not support drivers known to fail in Big Endian archs
When building in big endian architectures some device tests will fail,
as per this we're pretty sure that most of the drivers are not ready
to work in big-endian architectures.
Since we're aware of this, better to just stop supporting those drivers
instead of having each distribution to handle the problem.

So, add a list of supported drivers that is filled depending the
architecture type we're building on. Keep continue building those
drivers since we want to at least test-build them, but do not expose
them as libfprint drivers, so if a device in the system uses any of them
will be ignored.

At the same time, we keep track of the problem, so that we can fix the
drivers.

Related to #236
2021-01-20 18:29:05 +01:00
Benjamin Berg 55a2bb5536 Generate a hwdb instead of udev rules
We only use the rules/hwdb to enable auto-suspend. So, instead of
shipping our own rules, we can just use the existing autosuspend rules
and ship a hwdb that sets the appropriate flag.

Closes: #336
2021-01-19 14:21:44 +01:00
Benjamin Berg 16095a21fd tests: Add check that no supported device is whitelisted 2021-01-19 13:47:21 +01:00
Marco Trevisan (Treviño) 52d30a88fc tests: Ensure we prepend the libfprint libraries path when testing TOD 2020-12-10 16:21:11 +01:00
Marco Trevisan (Treviño) 80cf417b30 tests: Check if loading a pre-built binary keep working with libfprint
The libfprint tod fake library is built using using libtod v1.90.1+tod1
and we need to ensure that it will continue working until we won't
change ABI/API.
2020-12-04 02:16:16 +01:00
Marco Trevisan (Treviño) 7b0df77c49 tests: Get tod driver name from env variable 2020-12-04 02:06:54 +01:00
Marco Trevisan (Treviño) c9579ab21b test: Run all the fpi-device tests with the dynamically loaded TOD driver
We can ensure better that it works as expected repeating all the device
tests for it too.

The nice part is that we can just do this by re-defininig its GType as
the gtype of the loaded driver.
2020-12-03 04:38:15 +01:00
Marco Trevisan (Treviño) 9cbb3e5f55 tests: Isolate more the TOD tests so that we build the driver without clashes 2020-12-03 04:35:41 +01:00
Marco Trevisan (Treviño) d83453de02 tests: Move tod context creation into test-utils-tod library 2020-12-03 02:39:33 +01:00
Marco Trevisan (Treviño) a3aadd8398 Merge tag 'v1.90.5' into tod
Tag 1.90.5

Git-EVTag-v0-SHA512: 05650e2a6cf2290542936271b140e79015f56e35fbffc4677e37bf30963b2a38b49eb699db80cee6677ff348ea9e8548514a9f1e06a767269e44d7fac3334c45
2020-12-03 01:32:45 +01:00
Benjamin Berg ae3baadcf9 tests: Add a new test for vfs301
See: #320
2020-11-05 15:55:09 +01:00
Benjamin Berg 62edf93958 tests: Add AES3500 test case
Thanks for Federico Cupellini for providing test samples.
2020-09-29 10:35:48 +02:00
Marco Trevisan (Treviño) 52410c3310 Merge tag 'v1.90.3' into tod
Tag 1.90.3

Git-EVTag-v0-SHA512: 67e0d995146cb82107480520589b6c90583602b3945e03f71c2fdb5f0f2c681143c67e824e0572ae93995e75112c402efaad101f01be5e86a75389e4f1421821
2020-09-24 05:45:35 +02:00
boger.wang c85f385191 tests: add test for goodixmoc driver 2020-09-01 16:39:06 +08:00
Marco Trevisan (Treviño) 0e123d0752 Merge tag 'v1.90.2' into tod
Tag 1.90.2
2020-06-19 16:27:51 +02:00
Benjamin Berg 685052c605 tests: Add test for vfs0050 driver
This test is based on data captured by Evgeny.

Co-authored-by: Evgeny Gagauz <evgenij.gagauz@gmail.com>
2020-06-05 15:03:38 +00:00
Marco Trevisan (Treviño) 49fd3a5035 Merge tag 'v1.90.1' into tod
Tag 1.90.1
2020-02-27 05:24:32 +01:00
Marco Trevisan (Treviño) 0bb8ad1313 tests: Make meson be aware of the single python unit tests
Scan for the unit tests in virtual-image suite and handle them individually
2020-02-10 11:41:40 +01:00
Marco Trevisan (Treviño) 82ba69b1df meson: Depends on gusb 0.2.0, but only enable tests on 0.3.0 2020-02-10 11:41:40 +01:00
Marco Trevisan (Treviño) edd5d08bed Merge remote-tracking branch 'origin/master' into tod 2020-01-08 19:04:08 +01:00
Benjamin Berg ba07c74006 tests: Always add dummy skipping tests
Just hiding tests that cannot be run does not seem like the best idea.
So add dummy tests that are skipped, to denote that we could test more
than we actually do (even if it is just for drivers that are not
enabled).
2020-01-08 18:40:41 +01:00
Benjamin Berg c27a4faeca elan: Add umockdev based test
Unfortunately, the timeout handling cannot be simulated properly. This
also adds a workaround in the driver to not consider it a protocol error
if this happens.
2020-01-08 18:14:06 +01:00
Benjamin Berg 19f239ce61 tests: Add some frame assembly unit tests 2020-01-08 18:14:06 +01:00
Benjamin Berg f91e5310bb tests: Set MESON_SOURCE_ROOT to source root not build root 2020-01-02 13:46:46 +01:00
Marco Trevisan (Treviño) d998fb436e tests: Add TOD unit tests re-using the fake-driver 2019-12-19 15:03:16 +01:00
Marco Trevisan (Treviño) 42b1deaeea tests: Add unit tests for fpi-ssm
Verify that the state machine actions are done as we expected, being the
main tool for drivers, better to check that is done as we expect.
2019-12-14 17:20:47 +01:00
Marco Trevisan (Treviño) f31b8483d4 tests: Add fpi device tests
Verify drivers operations simulating a fake driver to check that the lib
interaction is correct.
2019-12-14 17:20:46 +01:00
Marco Trevisan (Treviño) 324258bc8c tests/meson: Support unit-tests non depending on virtual driver
Since tests depending on the fake device don't depend on virtual-image
driver anymore, let's change the way we organize the things, by putting
everything in the test lib, but enabling unit-tests depending on what they
depend on.
2019-12-14 17:20:46 +01:00
Marco Trevisan (Treviño) f578ebe82d test-device-fake: Add fake test driver to verify fpi functions 2019-12-14 17:20:46 +01:00