Marco Trevisan (Treviño)
78c78432b9
build: Generalize spi drivers detection
...
Don't be limited to elan only
2024-08-30 04:16:48 +02:00
Marco Trevisan (Treviño)
3f70bde21c
fp-device: Do not duplicate udev paths strings
...
This is happening already internally when using g_value_set_string
2024-06-17 19:08:16 +00:00
Marco Trevisan (Treviño)
eaec2339cc
libfprint-fprint-list-udev-hwdb: Add new broadcom device IDs
2024-05-22 17:09:38 +02:00
Marco Trevisan (Treviño)
83035be830
README: Add contact information
2024-05-03 15:35:11 +02:00
Marco Trevisan (Treviño)
4709efc678
fpi-device: Clarify transfer of errors in device complete tasks
2024-04-17 17:00:47 +00:00
Marco Trevisan (Treviño)
37ded921fd
fpi-device: Simplify logic of fpi_device_task_return_data_free
...
The clear functions will do NULL checks already, so there's no need to
duplicate such effort
2024-04-17 17:00:47 +00:00
Marco Trevisan (Treviño)
666cd0c08d
egismoc: Use FpiByteReader to compute the check bytes
...
We can read the values in the proper format without having to
deal with endianness ourself, so let's do this instead of manual
labor.
2024-02-20 18:07:18 +01:00
Marco Trevisan (Treviño)
e055781006
egismoc: Use FpiByteWriter to allocate the commit payload
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
48c8c539c7
egismoc: Use FpiByteWriter to generate the get check command
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
40c7599fb1
egismoc: Compute the delete command using FpiByteWriter
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
28c26c7d7e
egismoc: Use FpiByteReader to read the enrolled IDs
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
dd5a71695f
egismoc: Use FpiByteWriter to prepare the command message
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
977d324970
egismoc: Do not store twice the number of enrolled IDs
...
We already store it in the array, so let's just use that value
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
4992110829
fpi-byte-writer: Zero-init the allocated data by default
...
This could have been done via fill method + pos reset, but it's just
something we normally want to do for safety, so let's do it all the
times.
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
53f2539b6a
fpi-byte-writer: Use nicer API to unset the parent data
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
18e2906d62
fpi-byte-writer: Initialize the parent size when initializing with size
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
19806546a2
fpi-byte-writer: Add change pos method
...
It allows to move the position of the cursor with a relative position.
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
75559415fe
fpi-byte-writer/reader: Add autopointers definitions
2024-02-20 17:57:46 +01:00
Marco Trevisan (Treviño)
7dbb21e77a
build/tests: Skip a test if the test requires it during inspection
...
In case we don't have dependencies, we should skip the test, otherwise
we can just fail at test time
2024-02-20 08:25:53 +01:00
Marco Trevisan (Treviño)
4b72f27de6
build: Look for sh just once
2024-02-20 08:22:42 +01:00
Marco Trevisan (Treviño)
5ada931ede
ci: Export coverage to pages
...
So that we can link it outside
2024-02-20 01:55:11 +01:00
Marco Trevisan (Treviño)
bebe8565cd
Release 1.94.7
2024-02-20 01:09:54 +01:00
Marco Trevisan (Treviño)
5501dc7b47
build: Stop using deprecated dep.get_pkgconfig_variable() method
...
Use generic get_variable() instead
2024-02-20 01:02:00 +01:00
Marco Trevisan (Treviño)
3e5ab6fdad
egismoc: Convert value check values to big endian only when needed
...
Since the driver seem to require a big-endian value it's just better
to use architecture native endianness to compute the check value and
eventually just convert to big endian as the chip wants.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
5462db9901
egismoc: Convert the check value to little endian
...
In this way we can support the big-endian architectures too.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
59dc585ccd
egismoc: Simplify check bytes computation
...
We use big endian values for generating the check bytes, but we can do
the same logic in a simpler way.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
6768bd0ff4
egismoc: Use strictly sized types to hold check bytes contents
...
So we are sure about the size we're sending at compile time too.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
ed1815c3d9
build: Allow testing more drivers in both big and little endian
...
I've tested them in a s390x host and many more tests work fine, so let's
enable them.
2024-02-19 23:38:40 +01:00
Marco Trevisan (Treviño)
057c209beb
build: Build-depend on glib 2.68
...
GLib 2.68 is now more than 3 years old, so we can definitely start
using it without thinking too much.
This allows us to drop lots of compat code that we had around.
And like the previous commit tells us, it will also help us to have
more correct code around.
2024-02-19 22:23:02 +01:00
Marco Trevisan (Treviño)
90c4afded4
cleanup: Use non-const pointers for non constant cases
...
We had various cases in which we were using const pointers for
non constant data, and in fact we were allocating and free'ing
them.
So let's handle all these case properly, so that we won't have
newer GLib complaining at us!
2024-02-19 22:14:14 +01:00
Marco Trevisan (Treviño)
f8f28a066b
egismoc: Simplify fingerprint id and firmware reading
...
We can do copy and duplicate in oneshot since we are handling strings
after all.
2024-02-19 17:25:21 +01:00
Marco Trevisan (Treviño)
adc66edd8d
egismoc: Implement suspension properly
...
In case of suspension we can't just cancel the operations but
also return when completed, and this may not happen immediately
if there are ongoing operations.
This is automagically handled by libfprint internals, but in order
to make it happen, we need to cancel the ongoing operations and then
mark it completed. libfprint will then wait for the task completion
before actually marking the device as suspended.
2024-02-19 17:21:58 +01:00
Marco Trevisan (Treviño)
9af211cc89
egismoc: Use device cancellable on transfers
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
904bddd988
egismoc: Use g_new0 instead of g_malloc to make the type clearer
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
8badfa84e9
egismoc: Assert that current transfer is unset when setting it
...
We need to ensure that we are not overwriting the instance transfer, so
that we can be sure that we are only doing one transfer at time.
Also we need to ensure that the ssm unsetting it, is the owner of it.
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
b97efa6fed
egismoc: Assert that task ssm is unset when setting it
...
We need to ensure that we are not overwriting the instance SSM, so that
we can be sure that we are only doing one operation at time.
Also we need to ensure that the task unsetting it, is the owner of it.
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
6767cd1a4f
egismoc: Ensure that the command callback is after SSM is completed
...
We need to make sure that we won't trigger a callback when a SSM is
already in progress or we may end up overwriting it
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
226b6abfab
egismoc: Use an autopointer to cleanup error on command done callback
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
9e2c14d64e
egismoc: Clarify delete print ownership in delete callback
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
92aeb53ee8
egismoc: Simplify egismoc identification stage handling
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
87f68e3ac1
egismoc: Avoid gotos in init code, just handle the errors immediately
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
8073a5dc34
egismoc: Remove unused increments
...
This is also to please static analyzer
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
eb09156244
egismoc: Clear enrolled IDs using nicer GLib api
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
b8cfb95b49
egismoc: Ensure we've enough null bytes at the end of strings
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
a7843add0f
egismoc: Do not initialize to zero twice
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
b0f0322726
egismoc: Indentation and syntax fixes
2024-02-19 17:12:12 +01:00
Marco Trevisan (Treviño)
7476faba68
data, libfprint: Update list of unsupported drivers
2024-02-19 16:16:02 +01:00
Marco Trevisan (Treviño)
e05fbaa8ab
realtek: Do not initialize variables in switch cases
...
Handles scan-build warning
2024-02-13 14:54:42 +00:00
Marco Trevisan (Treviño)
61f9346aaf
realtek: Do not leak an error
...
Found by scan-build.
2024-02-13 14:54:42 +00:00
Marco Trevisan (Treviño)
d878148b5e
ci: Expose scan build artifacts on failures
...
That's the only case we care about
2024-02-13 14:54:42 +00:00
Marco Trevisan (Treviño)
ee509c7ee6
libfprint/fprint-list-udev-hwdb: Update unsupported list from wiki
2024-02-13 15:28:53 +01:00
Marco Trevisan (Treviño)
2fa0975dec
cleanup: Address some newer uncrustify syntax cleanups
2024-02-13 15:25:15 +01:00
Marco Trevisan (Treviño)
f3ab1f996f
fp-context: use g_strv_contains instead of manual labor
2024-02-13 15:25:15 +01:00
Marco Trevisan (Treviño)
92c5fc4643
cleanup: Use allow/deny lists instead of color based ones
...
There was nothing racist on those names here (what? Do human races even
exist?!), but let's avoid any confusion.
2024-02-13 15:19:47 +01:00
Marco Trevisan (Treviño)
85ec9ec5b2
ci: Allow flatpak failure
...
It's not a critical thing, so if it fails (as it does currently) we
should not block on that.
2024-02-13 14:42:18 +01:00
Marco Trevisan (Treviño)
b8933d8f81
fp-print: Do not check compile-time macros at runtime
2024-02-13 14:36:46 +01:00
Marco Trevisan (Treviño)
5a1253e37c
fp-image: Do not start thread detection task thread if already running
2023-11-24 21:02:50 +01:00
Marco Trevisan (Treviño)
2b008b52d7
fp-image: Simplify minutiae detection tasks
...
We can just use a GTask to handle the detection while using the
finish function to process the results to the image, so that it
is more predictable when this happens and it does not depend on
a thread returning.
Also remove data duplication when possible, this class wasn't
fully safe anyway to be used concurrently, so there's no point
to copy data when not needed. Also added the hard constraint to
not proceed with minutiae detection if something else is already
doing this.
At the same time we can mark the task to finish early on
cancellation.
2023-11-21 16:43:04 +00:00
Marco Trevisan (Treviño)
83939abe10
fp-image: Add FP_IMAGE_NONE flags definition
2023-11-21 16:43:04 +00:00
Marco Trevisan (Treviño)
16d02b3ed5
fp-image: Remove unused ref_count flag
...
It's an object so we already ref-count it.
2023-11-21 16:43:04 +00:00
Marco Trevisan (Treviño)
2414dbdbd4
libfprint/fprint-list-udev-hwdb: Update unsupported devices from wiki
2023-09-27 19:44:37 +02:00
Marco Trevisan (Treviño)
efba965b0c
ci: Build flatpak using gnome master
...
Also bump dependencies versions
2023-09-27 17:47:38 +02:00
Marco Trevisan (Treviño)
26d2c77c3d
ci: Allow manual flatpak build in any fork and MR
2023-09-27 17:29:24 +02:00
Marco Trevisan (Treviño)
eb01d7c97d
ci: Fix building flatpak using GNOME 42 runtime
...
Use versioned ci template so we are sure what we're using
2023-09-27 17:10:31 +02:00
Marco Trevisan (Treviño)
af3dca9003
tests/egis0570/capture.pcapng: Remove execution permission
2023-08-22 23:08:55 +00:00
Marco Trevisan (Treviño)
b924d715c9
ci: Move build dir during installed tests so we check that we don't use built artifacts
2023-08-21 14:19:27 +00:00
Marco Trevisan (Treviño)
1372d6f081
tests: Use native GTest utils to generate assets names
2023-08-21 14:19:27 +00:00
Marco Trevisan (Treviño)
135a015b6a
Release 1.94.6
2023-08-17 05:08:04 +02:00
Marco Trevisan (Treviño)
903ee43b2d
ci: Do not force-rebuild if an image with such tag exists
2023-06-28 16:35:16 +02:00
Marco Trevisan (Treviño)
8562f8a964
ci: Use meson commands only to setup, compile and install
...
Old ones are semi-deprecated, so let's adjust to what upstream suggests
2023-06-28 16:35:16 +02:00
Marco Trevisan (Treviño)
5ff794c105
ci: Run installed tests
2023-06-28 16:35:16 +02:00
Marco Trevisan (Treviño)
f68e0972c2
ci: Auto-Retry jobs on infrastructure failures
2023-06-28 16:35:16 +02:00
Marco Trevisan (Treviño)
ba3cc04e84
tests: Add support for installed tests
...
They allow distrubtions to check whether libfprint continues working as
expected, in different contexts.
2023-06-28 16:35:16 +02:00
Marco Trevisan (Treviño)
3d4cf44f9b
ci: Add gnome-desktop-testing to the image
...
It can be used to run the installed tests.
2023-06-28 16:23:45 +02:00
Marco Trevisan (Treviño)
8e702012fd
ci: Use debuginfo-install to install debug symbols
...
dnf doesn't seem to handle the plugin well in rawhide:
bash-5.2# dnf -y debuginfo-install glib2
Unknown argument "debuginfo-install" for command "dnf5".
Add "--help" for more information about the arguments.
2023-06-28 15:58:48 +02:00
Marco Trevisan (Treviño)
f49879b522
tests/virtual-image: Support passing specific FP_PRINTS_PATH env variable
2023-06-24 00:28:04 +02:00
Marco Trevisan (Treviño)
5e0bf2446b
meson: Bump requirements to 0.56 and adapt deprecated functions
2023-06-24 00:28:04 +02:00
Marco Trevisan (Treviño)
4d96a3efaa
tests/virtual-device: Check that removed devices are not in context anymore
2023-06-23 18:20:04 +02:00
Marco Trevisan (Treviño)
c27d72e3a1
tests/virtual-device: Do not preserve context on unplug tests
...
The unplug tests assume that the device is removed from the context once
they run, however we may have left the device around in a removed state
causing other tests to fail.
So isolate them in a new class where we create context and device
instances every time we run a test case.
2023-06-22 06:59:00 +02:00
Marco Trevisan (Treviño)
0819df6988
virtual-device: Reset transient parameters on deinit
...
Tests may change some options so we need to reset these values, even
though some may need not to be reserved when not in keep-alive mode.
2023-06-22 06:55:44 +02:00
Marco Trevisan (Treviño)
28579239a6
tests/virtual-device: Reset keep alive status when test is done
...
We don't want this to be preserved across tests, since it's meant to be
used inside a single test case.
2023-06-22 06:55:44 +02:00
Marco Trevisan (Treviño)
e48d2b467a
tests/virtual-device: Restore default enroll steps on tearDown
...
When running the tests as a single script we may leave the device in an
inconsistent state, so reset the enroll steps when done.
2023-06-22 06:55:44 +02:00
Marco Trevisan (Treviño)
1c589336a2
meson: Remove duplicate gnome imports
2023-06-22 06:55:44 +02:00
Marco Trevisan (Treviño)
9fd2ccff29
virtual-device-listener: Always return task even if we got zero bytes
...
See: https://gitlab.gnome.org/GNOME/glib/-/issues/1346
2023-03-15 15:26:37 +00:00
Marco Trevisan (Treviño)
b6223a9d0a
test-fpi-device: Only push pragma -wdanging-pointer in newer GCC versions
...
It may not be supported and warn otherwise
2023-03-15 15:23:17 +00:00
Marco Trevisan (Treviño)
5e98f10011
ci: Do not require coverage to always happen
...
meson coverage could be broken in some cases, so let's ignore the error
for now if it happens.
2023-03-15 16:18:17 +01:00
Marco Trevisan (Treviño)
e7ca05e1bf
ci: Use proper name for valgrind junit file
2023-03-15 16:18:17 +01:00
Marco Trevisan (Treviño)
677c50fc51
fprint-list-supported-devices: Do not double-free usb_list
...
We were leaking the spi_list instead.
2023-03-15 14:50:41 +01:00
Marco Trevisan (Treviño)
6395dda012
fp-image: Remove config.h inclusion in fpi-header
...
And also avoid defining a function we expose depending on it's presency.
2022-10-13 20:35:52 +00:00
Marco Trevisan (Treviño)
54bb0c12e6
fpi-image: Check for PIXMAN presency using #ifdef
...
That's a defined variable that may be there or not, and currently we
warn with:
- fpi-image.c:29:5: warning: "HAVE_PIXMAN" is not defined, evaluates to 0
2022-10-13 20:35:52 +00:00
Marco Trevisan (Treviño)
1f1ed80dbf
test-device-fake: Add more logging showing the current device action
2022-10-13 20:31:28 +00:00
Marco Trevisan (Treviño)
36bcb24b3a
fp-device: Move FpDevice private functions to public library
...
This these functions are not really needed by anything else than
FpDevice, so move them back to the cpp file, so that we don't expose
them in the private library, given that we don't need them
2022-10-13 20:31:28 +00:00
Marco Trevisan (Treviño)
ddacf07e3b
meson: Actually bump the version to 1.94.5
2022-10-13 20:31:28 +00:00
Marco Trevisan (Treviño)
86961a9429
Release 1.94.5
2022-10-13 05:57:04 +02:00
Marco Trevisan (Treviño)
3ca20a8e70
ci: Do not run two image rebuild pipelines on schedules
2022-10-13 05:37:12 +02:00
Marco Trevisan (Treviño)
3100404419
ci: Install more debug symbols
2022-10-13 05:27:44 +02:00
Marco Trevisan (Treviño)
892c9767a2
tests: Be stricter on valgrind leak checks
...
We used to ignore leaks, and we are ending up in having various of them,
so let's make valgrind to exit with error when using the valgrind test
setup (so in CI) to catch them better.
2022-10-13 05:20:28 +02:00
Marco Trevisan (Treviño)
2718dc02e0
vfs0050: Initialize the usb transfer buffer when allocating it
...
Ensure that the memory that we're going to populate via USB transfer is
initialized, otherwise valgrind may complain about (even if that's not
really an issue).
2022-10-13 05:04:03 +02:00
Marco Trevisan (Treviño)
abd7c66833
fp-device: Do not setup current action before updating temperature
...
At every action we update the device temperature, and this can
potentially lead to a failure, if the temperature is too hot.
However in such case we were failing a task that we had just stolen,
causing an error, tasks never returning and the device was left in an
undefined state.
So, just return early in case temperature is too hot, as we don't really
need to have the current task or action set at this point because
there's no active action to cancel yet.
This was causing random errors when running tests under valgrind
2022-10-13 05:04:03 +02:00
Marco Trevisan (Treviño)
8716ddb07a
fp-print: Fix a typo in documentation
2022-10-13 05:04:03 +02:00