fprintd:wip/3v1n0/handle-release-with-operation

Last commit made on 2020-02-11
Get this branch:
git clone -b wip/3v1n0/handle-release-with-operation https://git.launchpad.net/fprintd

Branch merges

Branch information

Name:
wip/3v1n0/handle-release-with-operation
Repository:
lp:fprintd

Recent commits

8f35394... by Marco Trevisan (Treviño)

tests/fprintd: Ensure that we get an error on early release

Ensure that we get an error when releasing a device that is in process of
enrollment, verification or identification

4620c89... by Marco Trevisan (Treviño)

device: Cancel the ongoing operation when releasing the device

If a device is currently verifying, identifying or enrolling we may want the
user to stop the operation before we actually release the device.

Otherwise we may end-up in trying to close (failing) the internal device,
while fprintd is still considering the device active, causing a dead-lock
(the device can't be released, but neither claimed again or stop the current
action).

In fact calling Claim() -> EnrollStart() -> Release(), we would fail with
the error

  net.reactivated.Fprint.Error.Internal:
  Release failed with error: The device is still busy with another
  operation, please try again later. (36)"

However, if we try to call VerifyStop, after this error, we'd fail because
for the fprintd logic, the device is not claimed anymore, but actually
closed, and we'd need to claim it again, but... That would still cause an
internal error.

To avoid this, in case Relase() is called cancel the ongoing operation,
and wait until it's done before completing the release call.

b1e6d82... by Marco Trevisan (Treviño)

device: Return 'verify-no-match' on cancelled operation

We were returning a 'verify-unknown-error' while we actually know what
happened, so better to return a soft operation failure.

7a3c511... by Marco Trevisan (Treviño)

device: Return 'enroll-failed' on cancelled operation

We were returning an 'enroll-unknown-error' while we actually know what
happened, so better to return a soft operation failure.

0c9d247... by Marco Trevisan (Treviño)

tests/fprintd: Verify that enroll stages are respected

Instead of automatically reply with the 'whorl' image for every enroll state
signal with result 'enroll-stage-passed', only perform the required enroll
stages and ensure that we get the expected results.

This also will allow to manually perform enroll steps in other tests.

cc4e2a2... by Marco Trevisan (Treviño)

tests/fprintd: Stop the verification session once we've done

In test_enroll_verify_list_delete we are starting a verification but we
never terminate this, and this may leave the device in an inconsistent state

7954d32... by Marco Trevisan (Treviño)

tests/fprintd: Deduplicate enrollment and result wait code

These operations can be repeated various times, so it's better to do it once

580cceb... by Bastien Nocera

1.90.1

b90b21f... by Bastien Nocera

build: Make pam module installation dir configurable

And avoid treating "libdir" as an absolute path, the documentation
clearly states that it is "relative to the prefix".

Based on patch by Timothy Gu <email address hidden>

6d583cb... by Marco Trevisan (Treviño)

ci: List dependencies on separate lines

This improves readability of additions and removals.