Merge ~sylvain-pineau/plainbox-provider-checkbox:fingerprint_tests into plainbox-provider-checkbox:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: d5ecd5a15972b3ae93e0a4f86422164c4292f44b
Merged at revision: 3875d75ba463c90b4d2b0157f3c591fb049d29a6
Proposed branch: ~sylvain-pineau/plainbox-provider-checkbox:fingerprint_tests
Merge into: plainbox-provider-checkbox:master
Diff against target: 194 lines (+145/-27)
3 files modified
units/fingerprint/jobs.pxu (+121/-27)
units/fingerprint/manifest.pxu (+4/-0)
units/fingerprint/test-plan.pxu (+20/-0)
Reviewer Review Type Date Requested Status
Devices Certification Bot Needs Fixing
Sylvain Pineau (community) Approve
Review via email: mp+384539@code.launchpad.net

Description of the change

New fingerprint reader tests for 20.04 certification.

Tested on a dell Vostro V131 with a Validity VFS5011 reader.
Tested using remote and local sessions (to check the normal_user settings)

HTML Report: https://people.canonical.com/~spineau/fingerprint.html

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved

review: Approve
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

[focal] [08:05:53] creating pristine container
[xenial] [08:06:11] starting container
Device project added to xenial-testing
[xenial] [08:06:20] provisioning container
[xenial] [08:06:43] Starting tests...
[xenial] Found a test script: ./requirements/container-tests-provider-checkbox
[xenial] [08:08:15] container-tests-provider-checkbox: PASS
[xenial] [08:08:15] Fixing file permissions in source directory
[xenial] [08:08:15] Destroying container
[bionic] [08:08:15] starting container
Device project added to bionic-testing
[bionic] [08:08:31] provisioning container
[bionic] [08:08:50] Starting tests...
[bionic] Found a test script: ./requirements/container-tests-provider-checkbox
[focal] [08:09:02] Unable to update pristine container!
[focal] output: https://paste.ubuntu.com/p/ch6x4QHGw6/
[focal] NOTE: unable to execute tests, marked as failed
[focal] Trying to destroy to reclaim possible resources
[focal] [08:09:05] Starting tests...
[focal] Found a test script: ./requirements/container-tests-provider-checkbox
[focal] [08:09:05] container-tests-provider-checkbox: FAIL
[focal] output: https://paste.ubuntu.com/p/7RD2gfBy5R/
[focal] [08:09:07] Fixing file permissions in source directory
[focal] [08:09:08] Unable to fix permissions!
[focal] output: https://paste.ubuntu.com/p/HJVFChSCPf/
[focal] Some files owned by root may have been left around, fix them manually with chown.
[focal] [08:09:10] Destroying container
[focal] [08:09:10] Unable to stop container!
[focal] output: https://paste.ubuntu.com/p/b8gHYmbj8C/
[focal] You may need to manually 'lxc stop -f focal-testing' to fix this
[bionic] [08:10:03] container-tests-provider-checkbox: PASS
[bionic] [08:10:03] Fixing file permissions in source directory
[bionic] [08:10:03] Destroying container

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/fingerprint/jobs.pxu b/units/fingerprint/jobs.pxu
2index c7951b0..f603f72 100644
3--- a/units/fingerprint/jobs.pxu
4+++ b/units/fingerprint/jobs.pxu
5@@ -1,32 +1,126 @@
6-plugin: manual
7+plugin: shell
8 category_id: com.canonical.plainbox::fingerprint
9-id: fingerprint/login
10-_description:
11- PURPOSE:
12- This test will verify that a fingerprint reader will work properly for logging into your system. This test case assumes that there's a testing account from which test cases are run and a personal account that the tester uses to verify the fingerprint reader
13- STEPS:
14- 1. Click on the User indicator on the left side of the panel (your user name).
15- 2. Select "Switch User Account"
16- 3. On the LightDM screen select your username.
17- 4. Use the fingerprint reader to login.
18- 5. Click on the user switcher applet.
19- 6. Select the testing account to continue running tests.
20- VERIFICATION:
21- Did the authentication procedure work correctly?
22+id: fingerprint/detect
23+user: root
24+command: fprintd-list ${SUDO_UID:-$NORMAL_USER}
25+estimated_duration: 1.0
26+_summary: Check if at least one fingerprint reader is detected
27+imports: from com.canonical.plainbox import manifest
28+requires: manifest.has_fingerprint_reader == 'True'
29
30-plugin: manual
31+plugin: user-interact
32+category_id: com.canonical.plainbox::fingerprint
33+id: fingerprint/enroll
34+depends: fingerprint/detect
35+user: root
36+command:
37+ set -e
38+ echo 'Removing existing signatures...'
39+ fprintd-delete ${SUDO_UID:-$NORMAL_USER} > /dev/null
40+ sleep 3
41+ fprintd-enroll ${SUDO_UID:-$NORMAL_USER}
42+estimated_duration: 20.0
43+_summary: Enroll a fingerprint
44+_purpose:
45+ Enroll the user's right index finger into the database
46+_steps:
47+ 1. Press Enter
48+ 2. Swipe your right index finger five times (wait 3s for the Enrolling message)
49+_verification:
50+ The verification of this test is automated.
51+imports: from com.canonical.plainbox import manifest
52+requires:
53+ manifest.has_fingerprint_reader == 'True'
54+ package.name == 'fprintd'
55+
56+plugin: user-interact
57+category_id: com.canonical.plainbox::fingerprint
58+id: fingerprint/verify-no-match
59+depends: fingerprint/enroll
60+user: root
61+command:
62+ sleep 2
63+ fprintd-verify ${SUDO_UID:-$NORMAL_USER} | tee /dev/stderr | grep -o verify-no-match
64+estimated_duration: 20.0
65+_summary: Fingerprint negative match
66+_purpose:
67+ The verification must not match when using a wrong finger
68+_steps:
69+ 1. Press Enter
70+ 2. Swipe an unenrolled finger on the reader
71+_verification:
72+ The verification of this test is automated.
73+imports: from com.canonical.plainbox import manifest
74+requires:
75+ manifest.has_fingerprint_reader == 'True'
76+ package.name == 'fprintd'
77+
78+plugin: user-interact
79+category_id: com.canonical.plainbox::fingerprint
80+id: fingerprint/verify-match
81+depends: fingerprint/verify-no-match
82+user: root
83+command:
84+ sleep 2
85+ for i in {1..3}
86+ do
87+ fprintd-verify ${SUDO_UID:-$NORMAL_USER} | tee /dev/stderr | grep -o verify-match && break || sleep 3
88+ [[ $i -eq 3 ]] && exit 1
89+ echo "Attempts left: $((3-$i))"
90+ done
91+estimated_duration: 20.0
92+_summary: Fingerprint positive match
93+_purpose:
94+ The verification must match when using the enrolled finger
95+_steps:
96+ 1. Press Enter
97+ 2. Swipe your enrolled finger on the reader (3 attempts max)
98+_verification:
99+ The verification of this test is automated.
100+imports: from com.canonical.plainbox import manifest
101+requires:
102+ manifest.has_fingerprint_reader == 'True'
103+ package.name == 'fprintd'
104+
105+plugin: user-interact-verify
106 category_id: com.canonical.plainbox::fingerprint
107 id: fingerprint/unlock
108-_description:
109- PURPOSE:
110- This test will verify that a fingerprint reader can be used to unlock a locked system.
111- STEPS:
112- 1. Click on the Session indicator (Cog icon on the Left side of the panel) .
113- 2. Select 'Lock screen'.
114- 3. Press any key or move the mouse.
115- 4. A window should appear that provides the ability to unlock either typing your password or using fingerprint authentication.
116- 5. Use the fingerprint reader to unlock.
117- 6. Your screen should be unlocked.
118- VERIFICATION:
119- Did the authentication procedure work correctly?
120+depends: fingerprint/verify-match
121+user: root
122+command:
123+ python3 <<EOF
124+ from evdev import UInput, ecodes as e
125+ ui = UInput()
126+ ui.write(e.EV_KEY, e.KEY_LEFTMETA, 1)
127+ ui.write(e.EV_KEY, e.KEY_L, 1)
128+ ui.write(e.EV_KEY, e.KEY_LEFTMETA, 0)
129+ ui.write(e.EV_KEY, e.KEY_L, 0)
130+ ui.syn()
131+ ui.close()
132+ EOF
133+_summary: Fingerprint unlock screen
134+_purpose:
135+ This test will verify that a fingerprint reader can be used to unlock a locked system.
136+_steps:
137+ 1. Press Enter to lock the screen
138+ 2. Press any key or move the mouse.
139+ 3. A window should appear that provides the ability to unlock either typing your password or using fingerprint authentication.
140+ 4. Use the fingerprint reader to unlock.
141+ 5. Your screen should be unlocked.
142+_verification:
143+ Did the authentication procedure work correctly?
144+imports: from com.canonical.plainbox import manifest
145+requires:
146+ manifest.has_fingerprint_reader == 'True'
147+ package.name == 'fprintd'
148
149+plugin: shell
150+category_id: com.canonical.plainbox::fingerprint
151+id: fingerprint/delete
152+after: fingerprint/unlock
153+user: root
154+command: fprintd-delete ${SUDO_UID:-$NORMAL_USER}
155+estimated_duration: 1.0
156+_summary: Remove existing fingerprint signatures
157+imports: from com.canonical.plainbox import manifest
158+requires: manifest.has_fingerprint_reader == 'True'
159diff --git a/units/fingerprint/manifest.pxu b/units/fingerprint/manifest.pxu
160new file mode 100644
161index 0000000..13866b8
162--- /dev/null
163+++ b/units/fingerprint/manifest.pxu
164@@ -0,0 +1,4 @@
165+unit: manifest entry
166+id: has_fingerprint_reader
167+_name: A fingerprint reader
168+value-type: bool
169diff --git a/units/fingerprint/test-plan.pxu b/units/fingerprint/test-plan.pxu
170new file mode 100644
171index 0000000..42ebd52
172--- /dev/null
173+++ b/units/fingerprint/test-plan.pxu
174@@ -0,0 +1,20 @@
175+id: fingerprint-full
176+unit: test plan
177+_name: QA tests for fingerprint reader
178+_description: Fingerprint tests
179+estimated_duration: 1m
180+include:
181+nested_part:
182+ fingerprint-manual
183+
184+id: fingerprint-manual
185+unit: test plan
186+_name: Manual fingerprint tests
187+_description: Manual tests for fingerprint reader
188+include:
189+ fingerprint/detect certification-status=non-blocker
190+ fingerprint/enroll certification-status=non-blocker
191+ fingerprint/verify-no-match certification-status=non-blocker
192+ fingerprint/verify-match certification-status=non-blocker
193+ fingerprint/unlock certification-status=non-blocker
194+ fingerprint/delete certification-status=non-blocker

Subscribers

People subscribed via source and target branches