Marco Trevisan (Treviño)
df36c66730
tod: Use dynamically defined version script
...
So we don't have to manage the soname manually
2021-04-14 18:15:07 +02:00
Marco Trevisan (Treviño)
35bcd4326c
libfprint-tod.ver: Add new symbols to newer TOD subversion
...
This should be something to do every time, as it may allow to define
multiple symbol versions, if something changes upstream.
2021-04-14 18:14:35 +02:00
Marco Trevisan (Treviño)
00128e11fd
README: Link to TOD README file
2021-04-13 22:35:34 +02: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)
18b3acdfb0
fpi-spi-transfer: Add structure padding
2021-04-13 22:35:34 +02:00
Marco Trevisan (Treviño)
1d7a561b0b
tod-inspector: Add support reading features
2021-04-13 22:35:28 +02:00
Marco Trevisan (Treviño)
a79a8d0e22
device: Keep device type ordering as default
2021-04-13 22:35:28 +02:00
Marco Trevisan (Treviño)
344d5cb2a9
fpi-device: Reduce padding on FpIdEntry to make space to new elements
2021-04-13 22:35:28 +02:00
Marco Trevisan (Treviño)
c906b30cba
tod: Add support for device features, keeping ABI compatibility
2021-04-13 22:35:28 +02:00
Marco Trevisan (Treviño)
eb329903b4
test-fp-device-tod: Ignore deprecated functions and use new ones
2021-04-13 22:17:39 +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)
e5e999de2c
fpi-image: Add missing padding
...
This breaks the ABI with such TOD drivers, but we don't have any using
an image device so far, so it's a safe break.
2021-04-13 22:14:56 +02:00
Marco Trevisan (Treviño)
683ac48e21
libfprint2-sections: Add missing FpFingerStatusFlags
2021-04-12 22:14:06 +02:00
Marco Trevisan (Treviño)
3b34fc9b5b
ci: Expose coverage report and meson logs in MRs
2021-04-12 22:14:06 +02:00
Marco Trevisan (Treviño)
41f8737b48
device: Deprecate fp_device_{supports,has}_* functions for has_feature
...
We can avoid having multiple device feature-check functions now and
just rely on a few.
Add uncrustify config to properly handle begin/end deprecation macros.
2021-04-12 22:14:06 +02:00
Marco Trevisan (Treviño)
ef805f2341
device: Expose supported features publicly as FpDeviceFeature
...
It can be convenient for device users to check what it supports, without
having multiple functions to check each single feature.
So expose this and add tests.
2021-04-12 22:14:06 +02:00
Marco Trevisan (Treviño)
bd99f865d8
fp-device: Gracefully handle capture calls on devices with no support
2021-04-12 22:14:06 +02:00
Marco Trevisan (Treviño)
3717468a8a
device: Make verification support optional
...
We always assumed a device can verify, but nothing prevents from having
a device that only can identify or capture.
So, given that we've more fine grained checks, let's stop the task if
this is the case.
2021-04-12 22:14:06 +02:00
Marco Trevisan (Treviño)
8d545a0b95
fpi-device: Add FpiDeviceFeature flags to FpDeviceClass
...
Allows drivers to define more fine grained features for devices, not
strictly depending on assumptions we can make depending on the
implemented vfuncs.
We keep this per class but could be in theory moved to each instance.
In any case, added an utility function to initialize it in the way we
can ensure that we've a consistent way for setting them across all the
devices.
2021-04-12 22:14:06 +02:00
Marco Trevisan (Treviño)
9321791d0e
ci: Do not use verbose logging for tests, just rely on artifacts
...
Only print errors if any
2021-04-01 18:01:29 +02:00
Marco Trevisan (Treviño)
4031bb62d7
device: Gracefully handle identify on devices with no support
...
We were crashing as trying to still call the identify vfunc, so check if
identification is supported and if not return a relative error.
Added test as well
2021-04-01 17:44:56 +02:00
Marco Trevisan (Treviño)
59767af552
doc/libfprint-2.types: Also include fp-image-device to get image type
2021-04-01 17:13:11 +02:00
Marco Trevisan (Treviño)
e8a7ff1033
tests/virtual-device: Add test checking close while we're still opening
2021-03-03 19:41:04 +01:00
Marco Trevisan (Treviño)
8ae27b4672
fpi-assemping: Do not include unneeded headers and do not use absolute search paths
2021-03-03 19:40:49 +01:00
Marco Trevisan (Treviño)
447cd3f7ba
fpi-assemping: Do not include unneeded headers and do not use absolute search paths
2021-03-03 19:35:16 +01:00
Marco Trevisan (Treviño)
08cf893e2e
examples: Add TOD inspector tool, to do some basic analysis of TOD drivers
...
Will print some drivers data
2021-03-03 19:30:38 +01:00
Marco Trevisan (Treviño)
8fd1fcbe49
virtual-device: Move shared functions into the internal scope
...
We are currently exporting such functions in the library, even though
they are meant to be only private.
2021-02-22 21:08:57 +01:00
Marco Trevisan (Treviño)
a1ae3cfdaa
meson: Bump version to 1.90.7+git20200222+tod1
2021-02-22 19:42:54 +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)
e4a297887b
virtual-image: Use explicit list of cases in which we want to listen
...
Depending on the enum order is ok, but not really maintainable so better
to explicitly list the states we want to listen.
2021-02-22 19:09:11 +01:00
Marco Trevisan (Treviño)
8b82ebeca5
Merge tag 'v1.90.7' into tod
...
Tag 1.90.7
Git-EVTag-v0-SHA512: 21642bcdac35b82cd3f56130603d09ebe62b321123f58ce4a491b8fa8f545ae86a7c3d670b212af474d561123efa91f0383ad416b07c3ce1d4df0d292e77bb94
2021-02-22 18:16:21 +01:00
Marco Trevisan (Treviño)
6a62d32c81
goodix: Consume the retry errors during verify/identify reports
...
We should not pass such kind of errors to complete functions, or we'll
fail the identification without ability to retry immediately.
2021-01-29 20:02:15 +01:00
Marco Trevisan (Treviño)
b2a64cc980
virtual-device: Do actual errors codes checks instead of regex checks
2021-01-28 15:49:22 +01:00
Marco Trevisan (Treviño)
88117c172e
tests/virtual-device: Add enroll and verify script test
2021-01-28 15:49:22 +01:00
Marco Trevisan (Treviño)
27a62443a1
virtual-device: Add SET_KEEP_ALIVE command, to keep the listener up
...
We may want to be able to talk with the device while it's closed to
queue commands to be performed once it opens (could be even a script),
so to do this we need to close the device first, send those commands and
eventually process them.
We used a trick to send an invalid command before that was ignored by
release, but having the device available is just easier to handle.
So, when keep alive is enabled we don't stop the listener when closing
but only on actual device disposition.
2021-01-28 15:49:22 +01:00
Marco Trevisan (Treviño)
2f7c78eb97
virtual-device: Make possible to use a script to perform enroll operations
2021-01-28 15:49:22 +01:00
Marco Trevisan (Treviño)
74f8a8ee27
virtual-device: Handle cancelled state gracefully in should_wait_to_sleep
2021-01-28 15:49:22 +01:00
Marco Trevisan (Treviño)
acd0a10e76
virtual-device: Add test that open fails with a busy error if is still ongoing
...
The idea of the test was just checking what happens when we're opening a
device multiple times while a first request is still going.
However, it actually ends up also checking the previous commit change
because without it we'd stop the close iteration before the device is
actually closed and stop the open iteration before the device is
actually opened, leading to an infinite loop.
2021-01-28 15:49:22 +01:00
Marco Trevisan (Treviño)
27c2466bda
fpi-device: Mark the device as open and notify it on idle callback
...
We're delaying any completed operation until we've completed an idle,
but the open/close state is changed and notified as soon as the device
completes the operation.
While this can be true, it means that we notify earlier than the finish
callback is actually called, while iterations are still needed to get
the actual state completed, and the current_task reset.
So if we'd open/close and iterate till fp_device_is_open() returns TRUE
we'd end up in a state in which the device is marked as ready, but it's
actually still busy since it's priv->current_task isn't unset yet.
The same if we'd try to do any action on notify::opened.
2021-01-28 15:49:22 +01:00
Marco Trevisan (Treviño)
33ba248c44
virtual-device: Add test checking for early errors during dev API calls
2021-01-28 15:49:22 +01:00
Marco Trevisan (Treviño)
43cf28b9da
fp-device: Do not try to deference potentially NULL task data
...
In case we do an early error return in verify and identify calls we
do not initialize the task data, but still in the finish functions we
still try to use it.
Avoid doing this, but just nullify the returned values.
2021-01-28 15:39:48 +01:00
Marco Trevisan (Treviño)
4da52f78f6
virtual-device: Check properties match the getters
2021-01-28 15:39:48 +01:00
Marco Trevisan (Treviño)
e4e0937848
tests/virtual-*: Check for enrolled prints properties
2021-01-28 15:39:48 +01:00
Marco Trevisan (Treviño)
25a6c916aa
fp-device: Fix property getters for enroll stages and driver ID
...
We were returning an invalid type for the enroll stages, while trying to
get the class from the private instance for the device driver
2021-01-28 15:39:48 +01:00
Marco Trevisan (Treviño)
51009b48a0
virtual-device: Process supported commands on device open
...
When opening the device we can process commands that we left for that
after the previous close, to do that we only have to inject an invalid
command that will be processed (and ignored) while closing, so that at
next device opening we will be able to proceed with the previously
sent commands.
Add tests to finally check this case!
2021-01-28 15:39:48 +01:00
Marco Trevisan (Treviño)
e1e3f6955e
virtual-device: Remove messages we can't process from queue when not scanning
...
Commands that are not valid for non-scan operations should be removed
from queue, or these may be re-proposed forever.
2021-01-28 15:38:57 +01:00
Marco Trevisan (Treviño)
c495b82000
virtual-device: Use python's with idiom to check GLib expected error messages
...
And we can properly provide a real traceback as well
2021-01-28 15:38:56 +01:00
Marco Trevisan (Treviño)
d90ee96df8
virtual-device: Return an duplicated data error if trying to re-enroll a print
2021-01-28 15:38:56 +01:00
Marco Trevisan (Treviño)
36304b736b
tests/virtual-device: Properly handle exceptions on enroll callback
...
We need to get them back to the caller function to be caught by the test
suite.
2021-01-28 15:38:29 +01:00
Marco Trevisan (Treviño)
31e34bd4bd
virtual-device: Emit data not found during verify/identify
...
If trying to identify a print not in the storage we emit data not found
error, this can be helpful to do further fprintd testing too
2021-01-28 15:38:29 +01:00
Marco Trevisan (Treviño)
ec4c7ca5a9
virtual-device-storage: Don't listed prints
2021-01-28 02:32:28 +01:00
Marco Trevisan (Treviño)
c4069065f9
virtual-device: Ensure we've an error before dereferencing it
2021-01-26 16:54:14 +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
Marco Trevisan (Treviño)
549718753f
fpi-device: Fix argument name on report_finger_status() annotation
2021-01-26 16:54:14 +01:00
Marco Trevisan (Treviño)
cfde050220
virtual-device: Add ability to close a device with delay or with error
2021-01-26 16:54:14 +01:00
Marco Trevisan (Treviño)
88a38c38af
virtual-device: Add support for sleeping and sending errors on list and delete
2021-01-26 16:54:14 +01:00
Marco Trevisan (Treviño)
7ffcc2f9e7
virtual-device: Make possible to inject sleep events while verifying/identifying
...
Each command should be separated by SLEEP to be considered as something
we want to perform during the current operation, otherwise will be used
by next operation consuming it.
2021-01-26 16:53:24 +01:00
Marco Trevisan (Treviño)
1dae6796f7
virtual-device: Report finger presency when we receive a 'SCAN' event
2021-01-26 04:49:50 +01:00
Marco Trevisan (Treviño)
0bb0492025
virtual-device: Mark finger as needed only after we start scanning
...
In case we sent a sleep event to the device we may want to wait it to
emit the finger needed state before the timeout is completed.
So add a function to manage this for all the scan cases
2021-01-26 04:49:50 +01:00
Marco Trevisan (Treviño)
3db0858fb0
tests/virtual-device: Add a class function to wait for a timeout
2021-01-26 04:49:50 +01:00
Marco Trevisan (Treviño)
2382506491
virtual-device: Add checks for verify reports
2021-01-26 04:49:50 +01:00
Marco Trevisan (Treviño)
3693c39bc5
virtual-device: Make cancellation support toggable
...
We may want to have the device to sleep while releasing an operation,
this will allow to do it.
2021-01-25 17:40:49 +01:00
Marco Trevisan (Treviño)
993109a7f8
virtual-device: Implement cancel vfunc, to stop timeouts
2021-01-25 17:40:49 +01:00
Marco Trevisan (Treviño)
18db20d160
virtual-device: Add support for sleep command
...
It can be used to delay operations, simulating a busy device.
2021-01-25 17:40:48 +01:00
Marco Trevisan (Treviño)
89b4c4ee75
virtual-device: Test unplug operation while we're verifying
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
153b24a95a
virtual-device: Use identify function for verify tests when possible
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
8c45c0952e
virtual-device: Split verify check function in two parts to be reusable
...
We can so inject further operations in the middle, such as for the
finger status check
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
c3ece8621d
virtual-device: Implement UNPLUG operation
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
67cb61cc18
tests/virtual-device: Add identification tests
...
Reusing most of the logic of the `check_verify` utility function
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
33ffadf402
tests/virtual-device: Cleanup device storage on teardown
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
162a83e484
tests/virtual-device: Add ability to enroll with a retry step and test it
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
dfb27222eb
tests/virtual-device: Add function that figures out the command from type
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
81e53c422d
virtual-device: Add support for changing the device scan type
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
be0b4ae2bb
tests/virtual-device: Trigger new scans when we got progress callback
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
56bcf1ffdd
virtual-device: Add command to change the number of enroll stages
...
As per this don't use the class value anymore at enroll phase, as it may
differ.
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
665de7813b
fpi-device: Ensure we're receiving a valid number of enroll stages
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
a291d17f26
virtual-device: Properly cleanup the virtual devices data
...
Ensure we call the parent finalize function and cleanup local data
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
e8886dbc6b
virtual-device: Support all the configured enrolling stages
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
3d6fb15b5c
virtual-device: Add API to change current finger status
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
43d0dfdd8f
virtual-device-storage: Set needed finger state on enroll and verify
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
50f522583e
virtual-device: Set needed finger state on enroll and verify
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
f0443ba2f3
virtual-device: Add support for reporting device Retry "errors"
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
546f35132c
tests/virtual-device: Use FPrint.DeviceError values to send errors
2021-01-25 17:40:15 +01:00
Marco Trevisan (Treviño)
ce9527d2cb
virtual-device: Wait for delayed commands to be processed
...
This allows to mimick the image device better, so that we can start an
operation and send the commands within some delay.
2021-01-25 17:40:13 +01:00
Marco Trevisan (Treviño) and Benjamin Berg
3b83157e9b
build: Skip the hwdb test if not all drivers are really enabled
2021-01-21 15:55:44 +00:00
Marco Trevisan (Treviño) and Benjamin Berg
57f836a0f6
udev-hwdb: Generate autosuspend list using a sorted list
2021-01-21 15:55:44 +00:00
Marco Trevisan (Treviño) and Benjamin Berg
170924ee4f
test-generated-hwdb: Just use diff to compare for being more informative
2021-01-21 15:55:44 +00:00
Marco Trevisan (Treviño)
2f6adce2fa
data: Keep using versioned libname for hwdb file
2021-01-21 01:17:02 +01:00
Marco Trevisan (Treviño)
018641ad20
build: Ensure we process the data dir
2021-01-21 00:58:08 +01:00
Marco Trevisan (Treviño)
2f2da87240
list-udev-hwdb: Add SPDX license to the generated file
...
And update it...
2021-01-20 22:03:40 +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
Marco Trevisan (Treviño)
3560a0f1e7
vfs5011: Remove the stray ;
2020-12-14 18:16:43 +01:00
Marco Trevisan (Treviño)
ed5339c4f5
vfs5011: Unset the recorded rows list when freeing them
...
Ensure that we unset the rows list when closing the device, so that we
won't try to append to invalid rows list new ones again.
2020-12-14 18:15:37 +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)
f8cb985476
Merge tag 'v1.90.6' into tod
...
Tag 1.90.6
Git-EVTag-v0-SHA512: 1cca84a89332a674d822476e587e1d9f30dc11bfff13724548ec0be66ab32f910fb5e7a7c9403c9a813538fdd9e86661105af8e2a4865b0b30d301601c7bddab
2020-12-10 16:10:39 +01:00
Marco Trevisan (Treviño) and Benjamin Berg
c02771d16b
goodixmoc: Add async identification test using on-owned deseralized prints
...
This simulates what fprintd does
2020-12-09 13:30:37 +01:00
Marco Trevisan (Treviño) and Benjamin Berg
989d498eb9
goodix: Don't leak the templates array during verify
...
When verifying we initialize a temporary templates array but we never
release it.
2020-12-09 12:55:26 +01:00
Marco Trevisan (Treviño) and Benjamin Berg
faade91c39
test-fpi-device: Add function to create fake FpPrint's and galleries
2020-12-09 11:47:33 +01:00