Timothy Gu 4a3ae5ccaf tests/fprintd: Allow tests to run even when virtual device is not available
The test file calls self.daemon_start() in order to start fprintd and
locate the virtual image device that's needed for the test to run.
However, since the virtual image driver is not available on all
libfprint installations, the test should be skipped if the driver is not
available.

The skipping mechanism used to work, by checking if self.device is None.
This is based on the assumption that self.device would be set to None in
cases where the driver is not available. However, even in the past
self.device is only set to None in the tearDown method and not in setUp,
so presumably in edge cases it didn't entirely work.

However, since 0fb4f3b021 which
consistently removes the self.device attribute rather than setting it to
None, the "self.device is None" check no longer works. In particular,
the following error message is shown:

    test_manager_get_default_device (__main__.FPrintdManagerTests) ...
    Did not find virtual device! Probably libfprint was build without
    the corresponding driver!
    ERROR

After this patch, the following is shown:

    test_manager_get_default_device (__main__.FPrintdManagerTests) ...
    Did not find virtual device! Probably libfprint was build without
    the corresponding driver!
    skipped 'Need virtual_image device to run the test'

We fix this bug by consistently setting self.device to None, in both the
setUp method before daemon_start gets called, and in tearDown. We also
make the same change to self.manager for consistency.

The issue was not caught on CI, as the CI configuration always installs
a libfprint version that has the virtual_image device explicitly enabled
in the preparation phase.
2020-03-23 12:22:20 -04:00
2015-02-09 18:11:10 +01:00
2020-02-05 16:54:54 +01:00
2020-02-06 12:21:51 +01:00
2020-03-19 23:33:58 -04:00
2020-02-05 16:54:54 +01:00
2020-03-17 15:31:08 +01:00
2008-11-02 11:16:13 +00:00
2020-02-05 17:07:10 +01:00
2008-12-10 00:54:27 +00:00
2020-02-10 14:59:42 +01:00
2018-06-07 22:25:39 +02:00
2018-05-31 17:28:19 +02:00

fprintd
=======

https://fprint.freedesktop.org/

Daemon to offer libfprint functionality over D-Bus
Might eat your kangaroo.

Written in C.

Licensed under the GPL version 2 or any later version (see COPYING).

A PAM login module is included in the 'pam' directory.

API use cases
=============

- User wants to use the fingerprint reader, and enroll
  his fingerprints, or remove some fingerprints from the database

- Administrator wants to enroll fingerprints for a particular user,
  or remove fingerprints for a particular user

- Laptop/desktop authentication:
  * Check for fingerprint devices
  * Check whether a particular user has any fingerprints enrolled
  * Verify a fingerprint for a particular user, or, if the device
  supports it, verify that the fingerprint matches against
  any of the fingerprints enrolled

- Point Of Sale authentication (in a bar, the fingerprint reader is
  used to see who accesses a particular point of sale/till, in place
  of PIN code authentication and/or tokens)
  * Given a list of users, verify which one has scanned their finger

Description
No description provided
Readme 1.7 MiB
Languages
C 80.9%
Meson 19.1%