summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2020-10-01 14:14:02 +0200
committerBenjamin Berg <benjamin@sipsolutions.net>2020-10-01 12:19:35 +0000
commite075d37590d553faada12973dcb2adbb955a0086 (patch)
tree9d0c1cec9b7ea56a056fec1156ed8d64c2c92559
parent18d6a86e9dd2b1cb1b59d67bfa9f80c1fa61f726 (diff)
tests: Check that a verify operation can be immediately restarted
This excercises the path where we early-report a result and the VerifyStop call must wait for the operation to complete intenernally. Note that this test cannot fail right now due to the FpImageDevice internal code still trying to hide the deactivation delay internally. See libfprint!174
-rwxr-xr-xtests/fprintd.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/fprintd.py b/tests/fprintd.py
index 9406fd9..0be7776 100755
--- a/tests/fprintd.py
+++ b/tests/fprintd.py
@@ -742,6 +742,23 @@ class FPrintdVirtualDeviceClaimedTest(FPrintdVirtualDeviceBaseTest):
self.assertEqual(self._last_result, 'verify-no-match')
self.device.VerifyStop()
+ def test_verify_finger_no_match_restart(self):
+ self.enroll_image('whorl', finger='left-thumb')
+ self.device.VerifyStart('(s)', 'left-thumb')
+ self.send_image('tented_arch')
+ self.wait_for_result()
+ self.assertTrue(self._verify_stopped)
+ self.assertEqual(self._last_result, 'verify-no-match')
+ self.device.VerifyStop()
+
+ # Immediately starting again after a no-match must work
+ self.device.VerifyStart('(s)', 'left-thumb')
+ self.send_image('whorl')
+ self.wait_for_result()
+ self.assertTrue(self._verify_stopped)
+ self.assertEqual(self._last_result, 'verify-match')
+ self.device.VerifyStop()
+
def test_verify_wrong_finger_match(self):
self.enroll_image('whorl', finger='left-thumb')
self.device.VerifyStart('(s)', 'left-toe')