Merge ~gavin.lin/plainbox-provider-snappy:after-suspend into plainbox-provider-snappy:master

Proposed by Gavin Lin
Status: Rejected
Rejected by: Sylvain Pineau
Proposed branch: ~gavin.lin/plainbox-provider-snappy:after-suspend
Merge into: plainbox-provider-snappy:master
Diff against target: 2416 lines (+1870/-440)
15 files modified
plainbox-provider-snappy/units/suspend/after-suspend/bluetooth.pxu (+41/-0)
plainbox-provider-snappy/units/suspend/after-suspend/ethernet.pxu (+29/-0)
plainbox-provider-snappy/units/suspend/after-suspend/i2c.pxu (+46/-0)
plainbox-provider-snappy/units/suspend/after-suspend/led.pxu (+48/-0)
plainbox-provider-snappy/units/suspend/after-suspend/location.pxu (+8/-0)
plainbox-provider-snappy/units/suspend/after-suspend/mediacard.pxu (+451/-0)
plainbox-provider-snappy/units/suspend/after-suspend/monitor.pxu (+55/-0)
plainbox-provider-snappy/units/suspend/after-suspend/usb-c.pxu (+153/-0)
plainbox-provider-snappy/units/suspend/after-suspend/usb.pxu (+124/-0)
plainbox-provider-snappy/units/suspend/after-suspend/watchdog.pxu (+28/-0)
plainbox-provider-snappy/units/suspend/after-suspend/wireless.pxu (+814/-0)
plainbox-provider-snappy/units/suspend/after-suspend/wwan.pxu (+48/-0)
plainbox-provider-snappy/units/suspend/jobs.pxu (+1/-414)
plainbox-provider-snappy/units/suspend/test-plan.pxu (+23/-26)
plainbox-provider-snappy/units/test-plan.pxu (+1/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Disapprove
Review via email: mp+314237@code.launchpad.net

Description of the change

Add tests for after suspend, basically they are same as the tests before suspend but removed unnecessary ones.

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

The preferred way to create "after suspend" jobs is as of plainbox 0.33 to use the flag 'also-after-suspend'

(See http://checkbox.readthedocs.io/projects/plainbox/en/latest/manpages/plainbox-job-units.html?highlight=also-after-suspend)

I'm closing this MR

review: Disapprove

Unmerged commits

644edc5... by Gavin Lin

Add some tests for after suspend

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/bluetooth.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/bluetooth.pxu
2new file mode 100644
3index 0000000..889c1dc
4--- /dev/null
5+++ b/plainbox-provider-snappy/units/suspend/after-suspend/bluetooth.pxu
6@@ -0,0 +1,41 @@
7+id: after-suspend/bluetooth/hid
8+_summary: Bluetooth input device works after suspend
9+_purpose:
10+ Check bluetooth input device work after suspend
11+ Since there's only CLI with ubuntu-core, test keyboard only
12+_steps:
13+ 1. Run following command to start bluetoothctl console:
14+ For Desktop:
15+ bluetoothctl -a
16+ For UC16:
17+ sudo bluez.bluetoothctl -a
18+ ***Following steps are run in bluetoothctl console***
19+ 2. Power on the device:
20+ power on
21+ 3. Register agent for keyboard:
22+ agent KeyboardOnly
23+ default-agent
24+ 4. Put controller in pairable mode:
25+ pairable on
26+ 5. Scan nearby bluetooth device:
27+ scan on
28+ 6. Stop Scanning after bluetooth keyboard is found:
29+ scan off
30+ 7. Pair bluetooth
31+ pair [MAC address of bluetooth keyboard]
32+ 8. Enter PIN Code on bluetooth keyboard if needed
33+ 9. Trust the bluetooth keyboard
34+ trust [MAC address of bluetooth keyboard]
35+ 10. Connect to bluetooth keyboard:
36+ connect [MAC address of bluetooth keyboard]
37+ 11. Quit bluetoothctl console
38+ quit
39+ 12. Use bluetooth keyboard to input
40+_verification:
41+ Can input from bluetooth input device
42+plugin: manual
43+category_id: 2013.com.canonical.plainbox::suspend
44+requires: device.category == 'BLUETOOTH'
45+depends: suspend/suspend-manual
46+estimated_duration: 5m
47+
48diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/ethernet.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/ethernet.pxu
49new file mode 100644
50index 0000000..c9d65b2
51--- /dev/null
52+++ b/plainbox-provider-snappy/units/suspend/after-suspend/ethernet.pxu
53@@ -0,0 +1,29 @@
54+id: after-suspend/ethernet/detect
55+_summary:
56+ Report info about available network devices after suspend
57+_description:
58+ Test to detect and return information about available network controllers on
59+ the system under test after suspend.
60+plugin: shell
61+category_id: 2013.com.canonical.plainbox::suspend
62+requires:
63+ device.category == 'NETWORK' or device.category == 'WIRELESS'
64+# package.name == 'kmod' or package.name == 'module-init-tools'
65+# package.name == 'pciutils'
66+depends: suspend/suspend-manual
67+command: network_device_info
68+estimated_duration: 2s
69+
70+unit: template
71+template-resource: device
72+template-filter: device.category == 'NETWORK'
73+id: after-suspend/ethernet/ping_{interface}
74+_summary: Can ping another machine over Ethernet port {interface} after suspend
75+_description: Check Ethernet works by pinging another machine after suspend
76+plugin: shell
77+command:
78+ gateway_ping_test -v --interface {interface}
79+category_id: 2013.com.canonical.plainbox::suspend
80+depends: suspend/suspend-manual
81+estimated_duration: 4.0
82+flags: preserve-locale
83diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/i2c.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/i2c.pxu
84new file mode 100644
85index 0000000..4579863
86--- /dev/null
87+++ b/plainbox-provider-snappy/units/suspend/after-suspend/i2c.pxu
88@@ -0,0 +1,46 @@
89+# Copyright 2016 Canonical Ltd.
90+# All rights reserved.
91+#
92+# Written by:
93+# Gavin Lin <gavin.lin@canonical.com>
94+
95+unit: job
96+id: after-suspend/i2c/i2c-bus-detect
97+_summary: Check number of detected I2C bus after suspend
98+_purpose:
99+ Verify if number of detected I2C bus is as expected after suspend
100+_steps:
101+ 1. This task is fully automatic, when expected i2c bus number($I2C_BUS_NUMBER)
102+ is set, this job will verify if detected number of i2c bus is as expected.
103+ 2. If expected i2c bus number is not set, this job will pass if system
104+ detected there's at least one i2c bus.
105+command:
106+ if [ -z ${I2C_BUS_NUMBER+x} ]; then
107+ i2c_driver_test bus
108+ else
109+ i2c_driver_test bus -b $I2C_BUS_NUMBER
110+ fi
111+user: root
112+plugin: shell
113+category_id: 2013.com.canonical.plainbox::suspend
114+environ: I2C_BUS_NUMBER
115+estimated_duration: 20s
116+requires: manifest.has_i2c == 'True'
117+depends: suspend/suspend-manual
118+imports: from 2013.com.canonical.plainbox import manifest
119+
120+unit: job
121+id: after-suspend/i2c/i2c-device-detect
122+_summary: Check if any I2C device detected after suspend
123+_purpose:
124+ Verify if there's any I2C device after suspend
125+_steps:
126+ 1. This task is fully automatic, test will pass if there's at least one
127+ i2c device detected on any I2C bus.
128+command:
129+ i2c_driver_test device
130+user: root
131+plugin: shell
132+category_id: 2013.com.canonical.plainbox::suspend
133+estimated_duration: 3m
134+depends: after-suspend/i2c/i2c-bus-detect
135diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/led.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/led.pxu
136new file mode 100644
137index 0000000..ce7961f
138--- /dev/null
139+++ b/plainbox-provider-snappy/units/suspend/after-suspend/led.pxu
140@@ -0,0 +1,48 @@
141+id: after-suspend/led/power
142+_summary: Power LED behavior when powered after suspend
143+_purpose:
144+ Check power led is on when system is powered on after suspend
145+_steps:
146+ 1. Check power led when system is powered on
147+_verification:
148+ Power led is on when system is powered on
149+plugin: manual
150+category_id: 2013.com.canonical.plainbox::suspend
151+depends: suspend/suspend-manual
152+estimated_duration: 30
153+
154+id: after-suspend/led/bluetooth
155+_summary: Bluetooth LED behavior after suspend
156+_purpose:
157+ Check bluetooth LED behavior is correct after suspend
158+_steps:
159+ 1. Run following command to start bluetoothctl console:
160+ sudo bluez.bluetoothctl -a
161+ ***Following steps are run in bluetoothctl console***
162+ 2. Power on the device:
163+ power on
164+ 3. Power off the device:
165+ power off
166+ 4. Quit bluetoothctl console
167+ quit
168+_verification:
169+ Bluetooth LED is turned on in step 2, and turned off in step 3.
170+plugin: manual
171+category_id: 2013.com.canonical.plainbox::suspend
172+depends: suspend/suspend-manual
173+estimated_duration: 3m
174+
175+id: after-suspend/led/serial
176+_summary: Serial ports LED behavior after suspend
177+_purpose:
178+ Check serial ports LED behavior is correct after suspend
179+_steps:
180+ 1. Start the test to send data to all serial ports (/dev/ttyS*)
181+_verification:
182+ All serial ports LED are on for a few seconds (3-4s)
183+plugin: user-interact-verify
184+command: echo {0..1024} | tee /dev/ttyS{0..100} &> /dev/null
185+user: root
186+category_id: 2013.com.canonical.plainbox::suspend
187+depends: suspend/suspend-manual
188+estimated_duration: 15
189diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/location.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/location.pxu
190new file mode 100644
191index 0000000..51bb2a0
192--- /dev/null
193+++ b/plainbox-provider-snappy/units/suspend/after-suspend/location.pxu
194@@ -0,0 +1,8 @@
195+id: after-suspend/location/monitor
196+_summary: Connects to a location service instance, monitoring its activity after suspend
197+command: timeout 15m bash -c 'locationd.monitor | grep -m1 --line-buffered ".*"'
198+category_id: 2013.com.canonical.plainbox::suspend
199+requires: snap.name == 'locationd'
200+depends: suspend/suspend-manual
201+estimated_duration: 900
202+flags: simple preserve-cwd
203diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/mediacard.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/mediacard.pxu
204new file mode 100644
205index 0000000..800eee9
206--- /dev/null
207+++ b/plainbox-provider-snappy/units/suspend/after-suspend/mediacard.pxu
208@@ -0,0 +1,451 @@
209+plugin: user-interact
210+category_id: 2013.com.canonical.plainbox::suspend
211+id: after-suspend/mediacard/mmc-insert
212+estimated_duration: 30.0
213+command: removable_storage_watcher --unmounted --memorycard insert sdio usb scsi
214+requires:
215+ snap.name == 'udisks2'
216+ device.category == 'CARDREADER'
217+depends: suspend/suspend-manual
218+user: root
219+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
220+_description:
221+ PURPOSE:
222+ This test will check that the systems media card reader can
223+ detect the insertion of a Multimedia Card (MMC) media after suspend.
224+ STEPS:
225+ 1. Commence the test and then insert an MMC card into the reader.
226+ (Note: this test will time-out after 20 seconds.)
227+ 2. Do not remove the device after this test.
228+ VERIFICATION:
229+ The verification of this test is automated. Do not change the
230+ automatically selected result.
231+
232+plugin: shell
233+category_id: 2013.com.canonical.plainbox::suspend
234+id: after-suspend/mediacard/mmc-storage
235+estimated_duration: 30.0
236+depends: after-suspend/mediacard/mmc-insert
237+user: root
238+command: removable_storage_test -s 67120000 --memorycard sdio usb scsi --auto-reduce-size
239+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
240+_description:
241+ This test is automated and executes after the mediacard/mmc-insert
242+ test is run. It tests reading and writing to the MMC card.
243+
244+plugin: user-interact
245+category_id: 2013.com.canonical.plainbox::suspend
246+id: after-suspend/mediacard/mmc-remove
247+estimated_duration: 30.0
248+depends: after-suspend/mediacard/mmc-insert
249+command: removable_storage_watcher --unmounted --memorycard remove sdio usb scsi
250+user: root
251+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
252+_description:
253+ PURPOSE:
254+ This test will check that the system correctly detects
255+ the removal of the MMC card from the systems card reader after suspend.
256+ STEPS:
257+ 1. Commence the test and then remove the MMC card from the reader.
258+ (Note: this test will time-out after 20 seconds.)
259+ VERIFICATION:
260+ The verification of this test is automated. Do not change the
261+ automatically selected result.
262+
263+plugin: user-interact
264+category_id: 2013.com.canonical.plainbox::suspend
265+id: after-suspend/mediacard/sd-insert
266+estimated_duration: 30.0
267+command: removable_storage_watcher --unmounted --memorycard insert sdio usb scsi
268+requires:
269+ snap.name == 'udisks2'
270+ device.category == 'CARDREADER'
271+depends: suspend/suspend-manual
272+user: root
273+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
274+_description:
275+ PURPOSE:
276+ This test will check that the systems media card reader can
277+ detect the insertion of an UNLOCKED Secure Digital (SD) media card after
278+ suspend.
279+ STEPS:
280+ 1. Commence the test and then insert an UNLOCKED SD card into the reader.
281+ (Note: this test will time-out after 20 seconds.)
282+ 2. Do not remove the device after this test.
283+ VERIFICATION:
284+ The verification of this test is automated. Do not change the
285+ automatically selected result.
286+
287+plugin: shell
288+category_id: 2013.com.canonical.plainbox::suspend
289+id: after-suspend/mediacard/sd-storage
290+estimated_duration: 30.0
291+depends: after-suspend/mediacard/sd-insert
292+user: root
293+command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
294+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
295+_description:
296+ This test is automated and executes after the mediacard/sd-insert
297+ test is run. It tests reading and writing to the SD card.
298+
299+plugin: user-interact
300+category_id: 2013.com.canonical.plainbox::suspend
301+id: after-suspend/mediacard/sd-remove
302+estimated_duration: 30.0
303+depends: after-suspend/mediacard/sd-insert
304+command: removable_storage_watcher --unmounted --memorycard remove sdio usb scsi
305+user: root
306+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
307+_description:
308+ PURPOSE:
309+ This test will check that the system correctly detects
310+ the removal of an SD card from the systems card reader after suspend.
311+ STEPS:
312+ 1. Commence the test and then remove the SD card from the reader.
313+ (Note: this test will time-out after 20 seconds.)
314+ VERIFICATION:
315+ The verification of this test is automated. Do not change the
316+ automatically selected result.
317+
318+plugin: shell
319+category_id: 2013.com.canonical.plainbox::suspend
320+id: after-suspend/mediacard/sd-preinserted
321+estimated_duration: 30.0
322+user: root
323+command: removable_storage_test -s 268400000 --memorycard -l sdio usb scsi && removable_storage_test --memorycard sdio usb scsi
324+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
325+requires:
326+ snap.name == 'udisks2'
327+ device.category == 'CARDREADER'
328+depends: suspend/suspend-manual
329+_description:
330+ This is a fully automated version of mediacard/sd-automated and assumes that the
331+ system under test has a memory card device plugged in prior to checkbox execution.
332+ It is intended for SRU automated testing.
333+
334+plugin: user-interact
335+category_id: 2013.com.canonical.plainbox::suspend
336+id: after-suspend/mediacard/sdhc-insert
337+estimated_duration: 30.0
338+command: removable_storage_watcher --unmounted --memorycard insert sdio usb scsi
339+requires:
340+ snap.name == 'udisks2'
341+ device.category == 'CARDREADER'
342+depends: suspend/suspend-manual
343+user: root
344+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
345+_description:
346+ PURPOSE:
347+ This test will check that the systems media card reader can
348+ detect the insertion of a UNLOCKED Secure Digital High-Capacity
349+ (SDHC) media card after suspend.
350+ STEPS:
351+ 1. Commence the test and then insert an UNLOCKED SDHC card into the reader.
352+ (Note: this test will time-out after 20 seconds.)
353+ 2. Do not remove the device after this test.
354+ VERIFICATION:
355+ The verification of this test is automated. Do not change the
356+ automatically selected result.
357+
358+plugin: shell
359+category_id: 2013.com.canonical.plainbox::suspend
360+id: after-suspend/mediacard/sdhc-storage
361+estimated_duration: 30.0
362+depends: after-suspend/mediacard/sdhc-insert
363+user: root
364+command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
365+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
366+_description:
367+ This test is automated and executes after the mediacard/sdhc-insert
368+ test is run. It tests reading and writing to the SDHC card.
369+
370+plugin: user-interact
371+category_id: 2013.com.canonical.plainbox::suspend
372+id: after-suspend/mediacard/sdhc-remove
373+estimated_duration: 30.0
374+depends: after-suspend/mediacard/sdhc-insert
375+command: removable_storage_watcher --unmounted --memorycard remove sdio usb scsi
376+user: root
377+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
378+_description:
379+ PURPOSE:
380+ This test will check that the system correctly detects
381+ the removal of an SDHC card from the systems card reader after suspend.
382+ STEPS:
383+ 1. Commence the test and then remove the SDHC card from the reader.
384+ (Note: this test will time-out after 20 seconds.)
385+ VERIFICATION:
386+ The verification of this test is automated. Do not change the
387+ automatically selected result.
388+
389+plugin: user-interact
390+category_id: 2013.com.canonical.plainbox::suspend
391+id: after-suspend/mediacard/cf-insert
392+estimated_duration: 30.0
393+command: removable_storage_watcher --unmounted --memorycard insert sdio usb scsi
394+requires:
395+ snap.name == 'udisks2'
396+ device.category == 'CARDREADER'
397+depends: suspend/suspend-manual
398+user: root
399+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
400+_description:
401+ PURPOSE:
402+ This test will check that the systems media card reader can
403+ detect the insertion of a Compact Flash (CF) media card after suspend.
404+ STEPS:
405+ 1. Commence the test and then insert a CF card into the reader.
406+ (Note: this test will time-out after 20 seconds.)
407+ 2. Do not remove the device after this test.
408+ VERIFICATION:
409+ The verification of this test is automated. Do not change the
410+ automatically selected result.
411+
412+plugin: shell
413+category_id: 2013.com.canonical.plainbox::suspend
414+id: after-suspend/mediacard/cf-storage
415+estimated_duration: 30.0
416+depends: after-suspend/mediacard/cf-insert
417+user: root
418+command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
419+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
420+_description:
421+ This test is automated and executes after the mediacard/cf-insert
422+ test is run. It tests reading and writing to the CF card.
423+
424+plugin: user-interact
425+category_id: 2013.com.canonical.plainbox::suspend
426+id: after-suspend/mediacard/cf-remove
427+depends: after-suspend/mediacard/cf-insert
428+estimated_duration: 30.0
429+command: removable_storage_watcher --unmounted --memorycard remove sdio usb scsi
430+user: root
431+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
432+_description:
433+ PURPOSE:
434+ This test will check that the system correctly detects
435+ the removal of a CF card from the systems card reader after suspend.
436+ STEPS:
437+ 1. Commence the test and then remove the CF card from the reader.
438+ (Note: this test will time-out after 20 seconds.)
439+ VERIFICATION:
440+ The verification of this test is automated. Do not change the
441+ automatically selected result.
442+
443+plugin: user-interact
444+category_id: 2013.com.canonical.plainbox::suspend
445+id: after-suspend/mediacard/sdxc-insert
446+estimated_duration: 30.0
447+command: removable_storage_watcher --unmounted --memorycard insert sdio usb scsi
448+requires:
449+ snap.name == 'udisks2'
450+ device.category == 'CARDREADER'
451+depends: suspend/suspend-manual
452+user: root
453+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
454+_description:
455+ PURPOSE:
456+ This test will check that the systems media card reader can
457+ detect the insertion of a Secure Digital Extended Capacity (SDXC) media card
458+ after suspend.
459+ STEPS:
460+ 1. Commence the test and then insert an UNLOCKED SDXC card into the reader.
461+ (Note: this test will time-out after 20 seconds.)
462+ 2. Do not remove the device after this test.
463+ VERIFICATION:
464+ The verification of this test is automated. Do not change the
465+ automatically selected result.
466+
467+plugin: shell
468+category_id: 2013.com.canonical.plainbox::suspend
469+id: after-suspend/mediacard/sdxc-storage
470+estimated_duration: 30.0
471+depends: after-suspend/mediacard/sdxc-insert
472+user: root
473+command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
474+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
475+_description:
476+ This test is automated and executes after the mediacard/sdxc-insert
477+ test is run. It tests reading and writing to the SDXC card.
478+
479+plugin: user-interact
480+category_id: 2013.com.canonical.plainbox::suspend
481+id: after-suspend/mediacard/sdxc-remove
482+estimated_duration: 30.0
483+depends: after-suspend/mediacard/sdxc-insert
484+command: removable_storage_watcher --unmounted --memorycard remove sdio usb scsi
485+user: root
486+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
487+_description:
488+ PURPOSE:
489+ This test will check that the system correctly detects
490+ the removal of a SDXC card from the systems card reader after suspend.
491+ STEPS:
492+ 1. Commence the test and then remove the SDXC card from the reader.
493+ (Note: this test will time-out after 20 seconds.)
494+ VERIFICATION:
495+ The verification of this test is automated. Do not change the
496+ automatically selected result.
497+
498+plugin: user-interact
499+category_id: 2013.com.canonical.plainbox::suspend
500+id: after-suspend/mediacard/ms-insert
501+estimated_duration: 30.0
502+command: removable_storage_watcher --unmounted --memorycard insert sdio usb scsi
503+requires:
504+ snap.name == 'udisks2'
505+ device.category == 'CARDREADER'
506+depends: suspend/suspend-manual
507+user: root
508+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
509+_description:
510+ PURPOSE:
511+ This test will check that the systems media card reader can
512+ detect the insertion of a Memory Stick (MS) media card after suspend.
513+ STEPS:
514+ 1. Commence the test and then insert a MS card into the reader.
515+ (Note: this test will time-out after 20 seconds.)
516+ 2. Do not remove the device after this test.
517+ VERIFICATION:
518+ The verification of this test is automated. Do not change the
519+ automatically selected result.
520+
521+plugin: shell
522+category_id: 2013.com.canonical.plainbox::suspend
523+id: after-suspend/mediacard/ms-storage
524+estimated_duration: 30.0
525+depends: after-suspend/mediacard/ms-insert
526+user: root
527+command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
528+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
529+_description:
530+ This test is automated and executes after the mediacard/ms-insert
531+ test is run. It tests reading and writing to the MS card.
532+
533+plugin: user-interact
534+category_id: 2013.com.canonical.plainbox::suspend
535+id: after-suspend/mediacard/ms-remove
536+estimated_duration: 30.0
537+depends: after-suspend/mediacard/ms-insert
538+command: removable_storage_watcher --unmounted --memorycard remove sdio usb scsi
539+user: root
540+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
541+_description:
542+ PURPOSE:
543+ This test will check that the system correctly detects
544+ the removal of a MS card from the systems card reader after suspend.
545+ STEPS:
546+ 1. Commence the test and then remove the MS card from the reader.
547+ (Note: this test will time-out after 20 seconds.)
548+ VERIFICATION:
549+ The verification of this test is automated. Do not change the
550+ automatically selected result.
551+
552+plugin: user-interact
553+category_id: 2013.com.canonical.plainbox::suspend
554+id: after-suspend/mediacard/msp-insert
555+estimated_duration: 30.0
556+command: removable_storage_watcher --unmounted --memorycard insert sdio usb scsi
557+user: root
558+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
559+requires:
560+ snap.name == 'udisks2'
561+ device.category == 'CARDREADER'
562+depends: suspend/suspend-manual
563+_description:
564+ PURPOSE:
565+ This test will check that the systems media card reader can
566+ detect the insertion of a Memory Stick Pro (MSP) media card after suspend.
567+ STEPS:
568+ 1. Commence the test and then insert a MSP card into the reader.
569+ (Note: this test will time-out after 20 seconds.)
570+ 2. Do not remove the device after this test.
571+ VERIFICATION:
572+ The verification of this test is automated. Do not change the
573+ automatically selected result.
574+
575+plugin: shell
576+category_id: 2013.com.canonical.plainbox::suspend
577+id: after-suspend/mediacard/msp-storage
578+estimated_duration: 30.0
579+depends: after-suspend/mediacard/msp-insert
580+user: root
581+command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
582+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
583+_description:
584+ This test is automated and executes after the mediacard/msp-insert
585+ test is run. It tests reading and writing to the MSP card.
586+
587+plugin: user-interact
588+category_id: 2013.com.canonical.plainbox::suspend
589+id: after-suspend/mediacard/msp-remove
590+estimated_duration: 30.0
591+depends: after-suspend/mediacard/msp-insert
592+command: removable_storage_watcher --unmounted --memorycard remove sdio usb scsi
593+user: root
594+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
595+_description:
596+ PURPOSE:
597+ This test will check that the system correctly detects
598+ the removal of a MSP card from the systems card reader after suspend.
599+ STEPS:
600+ 1. Commence the test and remove the MSP card from the reader.
601+ (Note: this test will time-out after 20 seconds.)
602+ VERIFICATION:
603+ The verification of this test is automated. Do not change the
604+ automatically selected result.
605+
606+plugin: user-interact
607+category_id: 2013.com.canonical.plainbox::suspend
608+id: after-suspend/mediacard/xd-insert
609+estimated_duration: 30.0
610+command: removable_storage_watcher --unmounted --memorycard insert sdio usb scsi
611+requires:
612+ snap.name == 'udisks2'
613+ device.category == 'CARDREADER'
614+depends: suspend/suspend-manual
615+user: root
616+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
617+_description:
618+ PURPOSE:
619+ This test will check that the systems media card reader can
620+ detect the insertion of a Extreme Digital (xD) media card after suspend.
621+ STEPS:
622+ 1. Commence the test and then insert a xD card into the reader.
623+ (Note: this test will time-out after 20 seconds.)
624+ 2. Do not remove the device after this test.
625+ VERIFICATION:
626+ The verification of this test is automated. Do not change the
627+ automatically selected result.
628+
629+plugin: shell
630+category_id: 2013.com.canonical.plainbox::suspend
631+id: after-suspend/mediacard/xd-storage
632+estimated_duration: 30.0
633+depends: after-suspend/mediacard/xd-insert
634+user: root
635+command: removable_storage_test -s 268400000 --memorycard sdio usb scsi
636+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
637+_description:
638+ This test is automated and executes after the mediacard/xd-insert
639+ test is run. It tests reading and writing to the xD card.
640+
641+plugin: user-interact
642+category_id: 2013.com.canonical.plainbox::suspend
643+id: after-suspend/mediacard/xd-remove
644+estimated_duration: 30.0
645+depends: after-suspend/mediacard/xd-insert
646+command: removable_storage_watcher --unmounted --memorycard remove sdio usb scsi
647+user: root
648+environ: LD_LIBRARY_PATH GI_TYPELIB_PATH
649+_description:
650+ PURPOSE:
651+ This test will check that the system correctly detects
652+ the removal of a xD card from the systems card reader after suspend.
653+ STEPS:
654+ 1. Commence the test and then remove the xD card from the reader.
655+ (Note: this test will time-out after 20 seconds.)
656+ VERIFICATION:
657+ The verification of this test is automated. Do not change the
658+ automatically selected result.
659+
660diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/monitor.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/monitor.pxu
661new file mode 100644
662index 0000000..8bf5387
663--- /dev/null
664+++ b/plainbox-provider-snappy/units/suspend/after-suspend/monitor.pxu
665@@ -0,0 +1,55 @@
666+id: after-suspend/monitor/dvi
667+_summary: Monitor works (DVI) after suspend
668+_purpose:
669+ Check output to display through DVI port after suspend
670+_steps:
671+ 1. Connect display to DVI port
672+ 2. Check the display
673+_verification:
674+ Output to display works
675+plugin: manual
676+category_id: 2013.com.canonical.plainbox::suspend
677+depends: suspend/suspend-manual
678+estimated_duration: 300
679+
680+id: after-suspend/monitor/hdmi
681+_summary: Monitor works (HDMI) after suspend
682+_purpose:
683+ Check output to display through HDMI port after suspend
684+_steps:
685+ 1. Connect display to HDMI port
686+ 2. Check the display
687+_verification:
688+ Output to display works
689+plugin: manual
690+category_id: 2013.com.canonical.plainbox::suspend
691+depends: suspend/suspend-manual
692+estimated_duration: 300
693+
694+id: after-suspend/monitor/dvi-to-vga
695+_summary: Monitor works (DVI-to-VGA) after suspend
696+_purpose:
697+ Check output to display through VGA adaptor on DVI port after suspend
698+_steps:
699+ 1. Connect display to VGA adaptor on DVI port
700+ 2. Check the display
701+_verification:
702+ Output to display works
703+plugin: manual
704+category_id: 2013.com.canonical.plainbox::suspend
705+depends: suspend/suspend-manual
706+estimated_duration: 300
707+
708+id: after-suspend/monitor/displayport_hotplug
709+plugin: manual
710+category_id: 2013.com.canonical.plainbox::suspend
711+depends: suspend/suspend-manual
712+_purpose:
713+ This test will check the DisplayPort port and the ability to do hotplugging
714+ after suspend.
715+_steps:
716+ Skip this test if your system does not have a DisplayPort port.
717+ 1. If a display is already connected, unplug it.
718+ 2. (Re-)Connect a display to the DisplayPort port on your system
719+_verification:
720+ Was the interface displayed correctly on the screen?
721diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/usb-c.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/usb-c.pxu
722new file mode 100644
723index 0000000..23c0e1d
724--- /dev/null
725+++ b/plainbox-provider-snappy/units/suspend/after-suspend/usb-c.pxu
726@@ -0,0 +1,153 @@
727+id: after-suspend/usb-c/c-to-a-adapter/hid
728+_summary: USB HID work on USB Type-C port using a "USB Type-C to Type-A" adapter after suspend
729+_purpose:
730+ This test will check that you can use a USB HID device plugged in a USB
731+ Type-C port using a "USB Type-C to Type-A" adapter after suspend
732+_steps:
733+ 1. Enable either a USB mouse or keyboard by plugging it in the USB Type-C port using a "USB Type-C to Type-A" adapter
734+ 2. For mice, perform actions such as moving the pointer, right and left button clicks and double clicks
735+ 3. For keyboards, switch to another tty and type some text
736+_verification:
737+ Did the device work as expected?
738+plugin: manual
739+category_id: 2013.com.canonical.plainbox::suspend
740+imports: from 2013.com.canonical.plainbox import manifest
741+requires: manifest.has_usb_type_c == 'True'
742+depends: suspend/suspend-manual
743+estimated_duration: 60
744+
745+id: after-suspend/usb-c/c-to-a-adapter/insert
746+_purpose:
747+ This test will check that the system correctly detects the insertion of
748+ a USB 3 storage device in a USB Type-C connector using a "Type-C to Type-A"
749+ adapter after suspend
750+_steps:
751+ 1. Commence the test
752+ 2. Connect a USB 3 storage device to a USB Type-C port using a
753+ "Type-C to Type-A" adapter
754+ 3. Do not unplug the device after the test.
755+_verification:
756+ The verification of this test is automated. Do not change the
757+ automatically selected result.
758+plugin: user-interact
759+user: root
760+command: checkbox-support-run_watcher insertion usb3
761+category_id: 2013.com.canonical.plainbox::suspend
762+imports: from 2013.com.canonical.plainbox import manifest
763+requires:
764+ manifest.has_usb_type_c == 'True'
765+depends: suspend/suspend-manual
766+estimated_duration: 30
767+
768+id: after-suspend/usb-c/c-to-a-adapter/storage-automated
769+_description:
770+ This test is automated and executes after the after-suspend/usb-c/c-to-a-adapter/insert test
771+ is run.
772+plugin: shell
773+user: root
774+command: usb_read_write
775+category_id: 2013.com.canonical.plainbox::suspend
776+imports: from 2013.com.canonical.plainbox import manifest
777+requires:
778+ manifest.has_usb_type_c == 'True'
779+depends: after-suspend/usb-c/c-to-a-adapter/insert
780+estimated_duration: 60
781+
782+id: after-suspend/usb-c/c-to-a-adapter/remove
783+_purpose:
784+ This test will check that the system correctly detects the removal of
785+ a USB 3 storage device connected to a USB Type-C port using a "USB Type-C
786+ to Type-A" adapter after suspend.
787+_steps:
788+ 1. Commence the test
789+ 2. Disconnect a USB 3 storage device to a USB Type-C port using a
790+ "Type-C to Type-A" adapter
791+_verification:
792+ The verification of this test is automated. Do not change the
793+ automatically selected result.
794+plugin: user-interact
795+user: root
796+command: checkbox-support-run_watcher removal usb3
797+category_id: 2013.com.canonical.plainbox::suspend
798+depends: after-suspend/usb-c/c-to-a-adapter/insert
799+imports: from 2013.com.canonical.plainbox import manifest
800+requires:
801+ manifest.has_usb_type_c == 'True'
802+estimated_duration: 30
803+
804+id: after-suspend/usb-c/hid
805+_summary: USB HID work on USB Type-C port after suspend
806+_purpose:
807+ This test will check that you can use a USB HID device plugged in a USB
808+ Type-C port after suspend
809+_steps:
810+ 1. Enable either a USB mouse or keyboard by plugging it in the USB Type-C port
811+ 2. For mice, perform actions such as moving the pointer, right and left button clicks and double clicks
812+ 3. For keyboards, switch to another tty and type some text
813+_verification:
814+ Did the device work as expected?
815+plugin: manual
816+category_id: 2013.com.canonical.plainbox::suspend
817+imports: from 2013.com.canonical.plainbox import manifest
818+requires: manifest.has_usb_type_c == 'True'
819+depends: suspend/suspend-manual
820+estimated_duration: 60
821+
822+id: after-suspend/usb-c/insert
823+_summary: USB 3.0 storage device insertion detected on USB Type-C port after suspend
824+_purpose:
825+ This test will check that the system correctly detects the insertion of
826+ a USB 3 storage device in a USB Type-C connector after suspend.
827+_steps:
828+ 1. Commence the test
829+ 2. Connect a USB 3 storage device to a USB Type-C port
830+ 3. Do not unplug the device after the test.
831+_verification:
832+ The verification of this test is automated. Do not change the
833+ automatically selected result.
834+plugin: user-interact
835+user: root
836+command: checkbox-support-run_watcher insertion usb3
837+category_id: 2013.com.canonical.plainbox::suspend
838+imports: from 2013.com.canonical.plainbox import manifest
839+requires:
840+ manifest.has_usb_type_c == 'True'
841+depends: suspend/suspend-manual
842+estimated_duration: 30
843+
844+id: after-suspend/usb-c/storage-automated
845+_summary: USB 3.0 storage device read & write works on USB Type-C port after suspend
846+_description:
847+ This test is automated and executes after the after-suspend/usb-c/insert test
848+ is run.
849+plugin: shell
850+user: root
851+command: usb_read_write
852+category_id: 2013.com.canonical.plainbox::suspend
853+imports: from 2013.com.canonical.plainbox import manifest
854+requires:
855+ manifest.has_usb_type_c == 'True'
856+depends: after-suspend/usb-c/insert
857+estimated_duration: 60
858+
859+id: after-suspend/usb-c/remove
860+_summary: USB 3.0 storage device removal detected on USB Type-C port after suspend
861+_purpose:
862+ This test will check that the system correctly detects the removal of
863+ a USB 3 storage device connected to a USB Type-C port after suspend.
864+_steps:
865+ 1. Commence the test
866+ 2. Disconnect a USB 3 storage device to a USB Type-C port
867+_verification:
868+ The verification of this test is automated. Do not change the
869+ automatically selected result.
870+plugin: user-interact
871+user: root
872+command: checkbox-support-run_watcher removal usb3
873+category_id: 2013.com.canonical.plainbox::suspend
874+depends: after-suspend/usb-c/insert
875+imports: from 2013.com.canonical.plainbox import manifest
876+requires:
877+ manifest.has_usb_type_c == 'True'
878+estimated_duration: 30
879+
880diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/usb.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/usb.pxu
881new file mode 100644
882index 0000000..8264ca8
883--- /dev/null
884+++ b/plainbox-provider-snappy/units/suspend/after-suspend/usb.pxu
885@@ -0,0 +1,124 @@
886+id: after-suspend/usb/hid
887+_summary: USB keyboard works after suspend
888+_purpose:
889+ Check USB input device works after suspend
890+_steps:
891+ 1. Connect USB keyboard
892+ 2. Input somethings with USB keyboard
893+_verification:
894+ What just input is displayed correctly
895+plugin: manual
896+category_id: 2013.com.canonical.plainbox::suspend
897+depends: suspend/suspend-manual
898+estimated_duration: 60
899+
900+id: after-suspend/usb/insert
901+_summary: USB 2.0 storage device insertion detected after suspend
902+_purpose:
903+ Check system can detect USB 2.0 storage when inserted after suspend
904+_steps:
905+ 1. Press continue
906+ 2. Connect USB 2.0 storage device
907+_verification:
908+ Can find new USB 2.0 storage device messages in /var/log/syslog
909+plugin: user-interact
910+user: root
911+command: checkbox-support-run_watcher insertion usb2
912+category_id: 2013.com.canonical.plainbox::suspend
913+depends: suspend/suspend-manual
914+estimated_duration: 120
915+
916+id: after-suspend/usb/storage-automated
917+_summary: USB 2.0 storage device read & write works after suspend
918+_purpose:
919+ Check system can read/write to USB 2.0 storage correctly
920+_steps:
921+ 1. This task is fully automatic and need USB 2.0 insertion test was applied
922+ first.
923+_verification:
924+ This task is fully automatic and will verify the result for you.
925+plugin: shell
926+depends: after-suspend/usb/insert
927+user: root
928+command: usb_read_write
929+category_id: 2013.com.canonical.plainbox::suspend
930+estimated_duration: 300
931+
932+id: after-suspend/usb/remove
933+_summary: USB 2.0 storage device removal detected after suspend
934+_purpose:
935+ Check system can detect removal of a USB 2.0 storage device after suspend
936+_steps:
937+ 1. Press continue
938+ 2. Disconnect USB 2.0 storage device
939+_verification:
940+ Can find USB 2.0 storage device removed messages in /var/log/syslog
941+plugin: user-interact
942+depends: after-suspend/usb/insert
943+user: root
944+command: checkbox-support-run_watcher removal usb2
945+category_id: 2013.com.canonical.plainbox::suspend
946+estimated_duration: 120
947+
948+id: after-suspend/usb3/hid
949+_summary: USB keyboard works on USB 3.0 port after suspend
950+_purpose:
951+ Check USB input device works on USB 3.0 port after suspend
952+_steps:
953+ 1. Connect USB keyboard to USB 3.0 port
954+ 2. Input somethings with USB keyboard
955+_verification:
956+ What just input is displayed correctly
957+plugin: manual
958+category_id: 2013.com.canonical.plainbox::suspend
959+depends: suspend/suspend-manual
960+estimated_duration: 60
961+
962+id: after-suspend/usb3/insert
963+_summary: USB 3.0 storage device insertion detected after suspend
964+_purpose:
965+ Check system can detect insertion of a USB 3.0 storage device after suspend
966+_steps:
967+ 1. Press continue
968+ 2. Connect USB 3.0 storage device
969+_verification:
970+ Can find new USB 3.0 storage device messages in /var/log/syslog
971+plugin: user-interact
972+user: root
973+command: checkbox-support-run_watcher insertion usb3
974+category_id: 2013.com.canonical.plainbox::suspend
975+depends: suspend/suspend-manual
976+estimated_duration: 120
977+
978+id: after-suspend/usb3/storage-automated
979+_summary: USB 3.0 storage device read & write works after suspend
980+_purpose:
981+ Check system can read/write to USB 3.0 storage devices correctly after suspend
982+_steps:
983+ 1. This task is fully automatic and need USB 3.0 insertion test was applied
984+ first.
985+_verification:
986+ This task is fully automatic and will verify the result for you.
987+plugin: shell
988+depends: after-suspend/usb3/insert
989+user: root
990+command: usb_read_write
991+category_id: 2013.com.canonical.plainbox::suspend
992+estimated_duration: 300
993+
994+id: after-suspend/usb3/remove
995+_summary: USB 3.0 storage device removal detected after suspend
996+_purpose:
997+ Check system can detect removal of a USB 3.0 storage device after suspend
998+_steps:
999+ 1. Press continue
1000+ 2. Disconnect USB 3.0 storage device
1001+_verification:
1002+ Can find USB 3.0 storage device removed messages in /var/log/syslog
1003+plugin: user-interact
1004+depends: after-suspend/usb3/insert
1005+user: root
1006+command: checkbox-support-run_watcher removal usb3
1007+category_id: 2013.com.canonical.plainbox::suspend
1008+estimated_duration: 120
1009+
1010diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/watchdog.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/watchdog.pxu
1011new file mode 100644
1012index 0000000..8a5c4ec
1013--- /dev/null
1014+++ b/plainbox-provider-snappy/units/suspend/after-suspend/watchdog.pxu
1015@@ -0,0 +1,28 @@
1016+id: after-suspend/watchdog/systemd-config
1017+_summary: Check if the hardware watchdog is properly configured after suspend
1018+command: journalctl | grep -i 'hardware watchdog'
1019+user: root
1020+category_id: 2013.com.canonical.plainbox::suspend
1021+depends: suspend/suspend-manual
1022+flags: simple
1023+
1024+id: after-suspend/watchdog/trigger-system-reset
1025+depends: after-suspend/watchdog/systemd-config
1026+_summary: Test that the watchdog module can trigger a system reset after suspend
1027+_purpose:
1028+ The watchdog module should be capable of issuing a hard reset of the SUT after
1029+ suspend.
1030+_steps:
1031+ 1. Commence the test to trigger a SysRq.
1032+ 2. Once the watchdog timeout has expired (10s) the SUT should reset itself.
1033+ 3. The board will reboot and the user should resume the test session.
1034+_verification:
1035+ Did the board reset itself?
1036+command:
1037+ echo 0 > /proc/sys/kernel/panic
1038+ echo c > /proc/sysrq-trigger
1039+flags: noreturn preserve-locale
1040+user: root
1041+plugin: user-interact-verify
1042+category_id: 2013.com.canonical.plainbox::suspend
1043+estimated_duration: 60
1044diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/wireless.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/wireless.pxu
1045new file mode 100644
1046index 0000000..3be4b0b
1047--- /dev/null
1048+++ b/plainbox-provider-snappy/units/suspend/after-suspend/wireless.pxu
1049@@ -0,0 +1,814 @@
1050+unit: template
1051+template-resource: device
1052+template-filter: device.category == 'WIRELESS'
1053+template-unit: job
1054+id: after-suspend/wireless/wireless_scanning_{interface}
1055+_summary: System can discover Wi-Fi networks on {interface} after suspend
1056+command:
1057+ nmcli dev wifi rescan
1058+ AP_COUNT=$(nmcli dev wifi list ifname {interface} | wc -l)
1059+ if [ $AP_COUNT -gt 1 ]; then
1060+ echo "Wireless access points discovered: $AP_COUNT"
1061+ exit 0
1062+ fi
1063+ echo "No wireless access points discovered."
1064+ exit 1
1065+user: root
1066+environ: LD_LIBRARY_PATH
1067+plugin: shell
1068+category_id: 2013.com.canonical.plainbox::suspend
1069+depends: suspend/suspend-manual
1070+estimated_duration: 6
1071+_description:
1072+ Check system can find a wireless network AP nearby after suspend
1073+flags: preserve-locale
1074+
1075+unit: template
1076+template-resource: device
1077+template-filter: device.category == 'WIRELESS'
1078+template-unit: job
1079+id: after-suspend/wireless/wireless_connection_open_ac_{interface}
1080+_summary: Connect to unencrypted 802.11ac Wi-Fi network on {interface} after suspend
1081+_purpose:
1082+ Check system can connect to insecure 802.11ac AP after suspend
1083+_steps:
1084+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
1085+ 2. Commence the test
1086+_verification:
1087+ If there's "Connection test passed" message in result, mark the test as passed.
1088+plugin: user-interact
1089+command: wifi_client_test -i {interface} -s $OPEN_AC_SSID
1090+environ: OPEN_AC_SSID
1091+user: root
1092+category_id: 2013.com.canonical.plainbox::suspend
1093+depends: suspend/suspend-manual
1094+estimated_duration: 90
1095+flags: preserve-locale
1096+
1097+unit: template
1098+template-resource: device
1099+template-filter: device.category == 'WIRELESS'
1100+template-unit: job
1101+id: after-suspend/wireless/wireless_connection_open_bg_{interface}
1102+_summary: Connect to unencrypted 802.11b/g Wi-Fi network on {interface} after suspend
1103+_purpose:
1104+ Check system can connect to insecure 802.11b/g AP after suspend
1105+_steps:
1106+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
1107+ 2. Commence the test
1108+_verification:
1109+ If there's "Connection test passed" message in result, mark the test as passed.
1110+plugin: user-interact
1111+command: wifi_client_test -i {interface} -s $OPEN_BG_SSID
1112+environ: OPEN_BG_SSID
1113+user: root
1114+category_id: 2013.com.canonical.plainbox::suspend
1115+depends: suspend/suspend-manual
1116+estimated_duration: 90
1117+flags: preserve-locale
1118+
1119+unit: template
1120+template-resource: device
1121+template-filter: device.category == 'WIRELESS'
1122+template-unit: job
1123+id: after-suspend/wireless/wireless_connection_open_n_{interface}
1124+_summary: Connect to unencrypted 802.11n Wi-Fi network on {interface} after suspend
1125+_purpose:
1126+ Check system can connect to insecure 802.11n AP after suspend
1127+_steps:
1128+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
1129+ 2. Commence the test
1130+_verification:
1131+ If there's "Connection test passed" message in result, mark the test as passed.
1132+plugin: user-interact
1133+command: wifi_client_test -i {interface} -s $OPEN_N_SSID
1134+environ: OPEN_N_SSID
1135+user: root
1136+category_id: 2013.com.canonical.plainbox::suspend
1137+depends: suspend/suspend-manual
1138+estimated_duration: 90
1139+flags: preserve-locale
1140+
1141+unit: template
1142+template-resource: device
1143+template-filter: device.category == 'WIRELESS'
1144+template-unit: job
1145+id: after-suspend/wireless/wireless_connection_wpa_ac_{interface}
1146+_summary: Connect to WPA-encrypted 802.11ac Wi-Fi network on {interface} after suspend
1147+_purpose:
1148+ Check system can connect to 802.11ac AP with wpa security after suspend
1149+_steps:
1150+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
1151+ 2. Commence the test
1152+_verification:
1153+ If there's "Connection test passed" message in result, mark the test as passed.
1154+plugin: user-interact
1155+command: wifi_client_test -i {interface} -s $WPA_AC_SSID -k $WPA_AC_PSK
1156+environ: WPA_AC_SSID WPA_AC_PSK
1157+user: root
1158+category_id: 2013.com.canonical.plainbox::suspend
1159+depends: suspend/suspend-manual
1160+estimated_duration: 90
1161+flags: preserve-locale
1162+
1163+unit: template
1164+template-resource: device
1165+template-filter: device.category == 'WIRELESS'
1166+template-unit: job
1167+id: after-suspend/wireless/wireless_connection_wpa_bg_{interface}
1168+_summary: Connect to WPA-encrypted 802.11b/g Wi-Fi network {interface} after suspend
1169+_purpose:
1170+ Check system can connect to 802.11b/g AP with wpa security after suspend
1171+_steps:
1172+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
1173+ 2. Commence the test
1174+_verification:
1175+ If there's "Connection test passed" message in result, mark the test as passed.
1176+plugin: user-interact
1177+command: wifi_client_test -i {interface} -s $WPA_BG_SSID -k $WPA_BG_PSK
1178+environ: WPA_BG_SSID WPA_BG_PSK
1179+user: root
1180+category_id: 2013.com.canonical.plainbox::suspend
1181+depends: suspend/suspend-manual
1182+estimated_duration: 90
1183+flags: preserve-locale
1184+
1185+unit: template
1186+template-resource: device
1187+template-filter: device.category == 'WIRELESS'
1188+template-unit: job
1189+id: after-suspend/wireless/wireless_connection_wpa_n_{interface}
1190+_summary: Connect to WPA-encrypted 802.11n Wi-Fi network on {interface} after suspend
1191+_purpose:
1192+ Check system can connect to 802.11n AP with wpa security after suspend
1193+_steps:
1194+ 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
1195+ 2. Commence the test
1196+_verification:
1197+ If there's "Connection test passed" message in result, mark the test as passed.
1198+plugin: user-interact
1199+command: wifi_client_test -i {interface} -s $WPA_N_SSID -k $WPA_N_PSK
1200+environ: WPA_N_SSID WPA_N_PSK
1201+user: root
1202+category_id: 2013.com.canonical.plainbox::suspend
1203+depends: suspend/suspend-manual
1204+estimated_duration: 90
1205+flags: preserve-locale
1206+
1207+unit: template
1208+template-resource: device
1209+template-filter: device.category == 'WIRELESS'
1210+template-unit: job
1211+id: after-suspend/wireless/wireless_connection_open_ac_nm_{interface}
1212+_summary: Connect to unencrypted 802.11ac Wi-Fi network on {interface} after suspend
1213+_purpose:
1214+ Check system can connect to insecure 802.11ac AP after suspend
1215+plugin: shell
1216+command:
1217+ nmcli g > /dev/null
1218+ if [ $? -ne 0 ]; then
1219+ exit 1
1220+ fi
1221+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
1222+ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
1223+ nmcli dev wifi rescan
1224+ nmcli dev wifi connect $OPEN_AC_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1225+ iw dev {interface} link
1226+ COUNT=$(iw dev {interface} link | wc -l)
1227+ if [ $COUNT -gt 1 ]; then
1228+ exit 0
1229+ fi
1230+ exit 1
1231+environ: LD_LIBRARY_PATH OPEN_AC_SSID
1232+user: root
1233+category_id: 2013.com.canonical.plainbox::suspend
1234+depends: suspend/suspend-manual
1235+estimated_duration: 5.0
1236+flags: preserve-locale
1237+
1238+unit: template
1239+template-resource: device
1240+template-filter: device.category == 'WIRELESS'
1241+template-unit: job
1242+id: after-suspend/wireless/wireless_connection_open_bg_nm_{interface}
1243+_summary: Connect to unencrypted 802.11b/g Wi-Fi network on {interface} after suspend
1244+_purpose:
1245+ Check system can connect to insecure 802.11b/g AP after suspend
1246+plugin: shell
1247+command:
1248+ nmcli g > /dev/null
1249+ if [ $? -ne 0 ]; then
1250+ exit 1
1251+ fi
1252+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
1253+ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
1254+ nmcli dev wifi rescan
1255+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1256+ iw dev {interface} link
1257+ COUNT=$(iw dev {interface} link | wc -l)
1258+ if [ $COUNT -gt 1 ]; then
1259+ exit 0
1260+ fi
1261+ exit 1
1262+environ: LD_LIBRARY_PATH OPEN_BG_SSID
1263+user: root
1264+category_id: 2013.com.canonical.plainbox::suspend
1265+depends: suspend/suspend-manual
1266+estimated_duration: 5.0
1267+flags: preserve-locale
1268+
1269+unit: template
1270+template-resource: device
1271+template-filter: device.category == 'WIRELESS'
1272+template-unit: job
1273+id: after-suspend/wireless/wireless_connection_open_n_nm_{interface}
1274+_summary: Connect to unencrypted 802.11n Wi-Fi network on {interface} after suspend
1275+_purpose:
1276+ Check system can connect to insecure 802.11n AP after suspend
1277+plugin: shell
1278+command:
1279+ nmcli g > /dev/null
1280+ if [ $? -ne 0 ]; then
1281+ exit 1
1282+ fi
1283+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
1284+ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
1285+ nmcli dev wifi rescan
1286+ nmcli dev wifi connect $OPEN_N_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1287+ iw dev {interface} link
1288+ COUNT=$(iw dev {interface} link | wc -l)
1289+ if [ $COUNT -gt 1 ]; then
1290+ exit 0
1291+ fi
1292+ exit 1
1293+environ: LD_LIBRARY_PATH OPEN_N_SSID
1294+user: root
1295+category_id: 2013.com.canonical.plainbox::suspend
1296+depends: suspend/suspend-manual
1297+estimated_duration: 5.0
1298+flags: preserve-locale
1299+
1300+unit: template
1301+template-resource: device
1302+template-filter: device.category == 'WIRELESS'
1303+template-unit: job
1304+id: after-suspend/wireless/wireless_connection_wpa_ac_nm_{interface}
1305+_summary: Connect to WPA-encrypted 802.11ac Wi-Fi network on {interface} after suspend
1306+_purpose:
1307+ Check system can connect to 802.11ac AP with wpa security after suspend
1308+plugin: shell
1309+command:
1310+ nmcli g > /dev/null
1311+ if [ $? -ne 0 ]; then
1312+ exit 1
1313+ fi
1314+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
1315+ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
1316+ nmcli dev wifi rescan
1317+ nmcli dev wifi connect $WPA_AC_SSID password $WPA_AC_PSK ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1318+ iw dev {interface} link
1319+ COUNT=$(iw dev {interface} link | wc -l)
1320+ if [ $COUNT -gt 1 ]; then
1321+ exit 0
1322+ fi
1323+ exit 1
1324+environ: LD_LIBRARY_PATH WPA_AC_SSID WPA_AC_PSK
1325+user: root
1326+category_id: 2013.com.canonical.plainbox::suspend
1327+depends: suspend/suspend-manual
1328+estimated_duration: 5.0
1329+flags: preserve-locale
1330+
1331+unit: template
1332+template-resource: device
1333+template-filter: device.category == 'WIRELESS'
1334+template-unit: job
1335+id: after-suspend/wireless/wireless_connection_wpa_bg_nm_{interface}
1336+_summary: Connect to WPA-encrypted 802.11b/g Wi-Fi network on {interface} after suspend
1337+_purpose:
1338+ Check system can connect to 802.11b/g AP with wpa security after suspend
1339+plugin: shell
1340+command:
1341+ nmcli g > /dev/null
1342+ if [ $? -ne 0 ]; then
1343+ exit 1
1344+ fi
1345+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
1346+ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
1347+ nmcli dev wifi rescan
1348+ nmcli dev wifi connect $WPA_BG_SSID password $WPA_BG_PSK ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1349+ iw dev {interface} link
1350+ COUNT=$(iw dev {interface} link | wc -l)
1351+ if [ $COUNT -gt 1 ]; then
1352+ exit 0
1353+ fi
1354+ exit 1
1355+environ: LD_LIBRARY_PATH WPA_BG_SSID WPA_BG_PSK
1356+user: root
1357+category_id: 2013.com.canonical.plainbox::suspend
1358+depends: suspend/suspend-manual
1359+estimated_duration: 5.0
1360+flags: preserve-locale
1361+
1362+unit: template
1363+template-resource: device
1364+template-filter: device.category == 'WIRELESS'
1365+template-unit: job
1366+id: after-suspend/wireless/wireless_connection_wpa_n_nm_{interface}
1367+_summary: Connect to WPA-encrypted 802.11n Wi-Fi network on {interface} after suspend
1368+_purpose:
1369+ Check system can connect to 802.11n AP with wpa security after suspend
1370+plugin: shell
1371+command:
1372+ nmcli g > /dev/null
1373+ if [ $? -ne 0 ]; then
1374+ exit 1
1375+ fi
1376+ trap "nmcli dev disconnect {interface}; nmcli con delete id WIFI_TEST_CREATED_BY_CHECKBOX" EXIT
1377+ nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs nmcli c delete
1378+ nmcli dev wifi rescan
1379+ nmcli dev wifi connect $WPA_N_SSID password $WPA_N_PSK ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1380+ iw dev {interface} link
1381+ COUNT=$(iw dev {interface} link | wc -l)
1382+ if [ $COUNT -gt 1 ]; then
1383+ exit 0
1384+ fi
1385+ exit 1
1386+environ: LD_LIBRARY_PATH WPA_N_SSID WPA_N_PSK
1387+user: root
1388+category_id: 2013.com.canonical.plainbox::suspend
1389+depends: suspend/suspend-manual
1390+estimated_duration: 5.0
1391+flags: preserve-locale
1392+
1393+unit: template
1394+template-resource: device
1395+template-filter: device.category == 'WIRELESS'
1396+template-unit: job
1397+id: after-suspend/wireless/wifi_ap_open_a_no_sta_{interface}
1398+category_id: 2013.com.canonical.plainbox::suspend
1399+_summary: Create open 802.11a Wi-Fi Access Point on {interface} with no STA after suspend
1400+plugin: manual
1401+requires:
1402+ wifi_interface_mode.AP == 'supported'
1403+ snap.name == 'wifi-ap'
1404+depends: suspend/suspend-manual
1405+estimated_duration: 120.0
1406+_purpose:
1407+ Check that the system can create an open 802.11a Access Point without any STA connection after suspend
1408+_steps:
1409+ 1. Ensure no Soft AP is running prior running this test:
1410+ $ sudo systemctl stop snap.wifi-ap.backend
1411+ 2. Delete existing wireless connections known to Network Manager:
1412+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1413+ 3. Configure the wifi-ap snap:
1414+ $ wifi-ap.config set wifi.interface {interface}
1415+ $ wifi-ap.config set wifi.operation-mode a
1416+ $ wifi-ap.config set wifi.interface-mode direct
1417+ $ wifi-ap.config set disabled 0
1418+ $ wifi-ap.config set wifi.security open
1419+ 4. Start the wifi-ap service:
1420+ $ sudo systemctl start snap.wifi-ap.backend
1421+ 5. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1422+ 6. Attempt to connect to the AP
1423+ 7. Stop the wifi-ap service:
1424+ $ sudo systemctl stop snap.wifi-ap.backend
1425+_verification:
1426+ Did the client connect?
1427+flags: preserve-locale
1428+
1429+unit: template
1430+template-resource: device
1431+template-filter: device.category == 'WIRELESS'
1432+template-unit: job
1433+id: after-suspend/wireless/wifi_ap_open_b_no_sta_{interface}
1434+category_id: 2013.com.canonical.plainbox::suspend
1435+_summary: Create open 802.11b Wi-Fi Access Point on {interface} with no STA after suspend
1436+plugin: manual
1437+requires:
1438+ wifi_interface_mode.AP == 'supported'
1439+ snap.name == 'wifi-ap'
1440+depends: suspend/suspend-manual
1441+estimated_duration: 120.0
1442+_purpose:
1443+ Check that the system can create an open 802.11b Access Point without any STA connection after suspend
1444+_steps:
1445+ 1. Ensure no Soft AP is running prior running this test:
1446+ $ sudo systemctl stop snap.wifi-ap.backend
1447+ 2. Delete existing wireless connections known to Network Manager:
1448+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1449+ 3. Configure the wifi-ap snap:
1450+ $ wifi-ap.config set wifi.interface {interface}
1451+ $ wifi-ap.config set wifi.operation-mode b
1452+ $ wifi-ap.config set wifi.interface-mode direct
1453+ $ wifi-ap.config set disabled 0
1454+ $ wifi-ap.config set wifi.security open
1455+ 4. Start the wifi-ap service:
1456+ $ sudo systemctl start snap.wifi-ap.backend
1457+ 5. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1458+ 6. Attempt to connect to the AP
1459+ 7. Stop the wifi-ap service:
1460+ $ sudo systemctl stop snap.wifi-ap.backend
1461+_verification:
1462+ Did the client connect?
1463+flags: preserve-locale
1464+
1465+unit: template
1466+template-resource: device
1467+template-filter: device.category == 'WIRELESS'
1468+template-unit: job
1469+id: after-suspend/wireless/wifi_ap_open_g_no_sta_{interface}
1470+category_id: 2013.com.canonical.plainbox::suspend
1471+depends: suspend/suspend-manual
1472+_summary: Create open 802.11g Wi-Fi Access Point on {interface} with no STA after suspend
1473+plugin: manual
1474+requires:
1475+ wifi_interface_mode.AP == 'supported'
1476+ snap.name == 'wifi-ap'
1477+estimated_duration: 120.0
1478+_purpose:
1479+ Check that the system can create an open 802.11g Access Point without any STA connection after suspend
1480+_steps:
1481+ 1. Ensure no Soft AP is running prior running this test:
1482+ $ sudo systemctl stop snap.wifi-ap.backend
1483+ 2. Delete existing wireless connections known to Network Manager:
1484+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1485+ 3. Configure the wifi-ap snap:
1486+ $ wifi-ap.config set wifi.interface {interface}
1487+ $ wifi-ap.config set wifi.operation-mode g
1488+ $ wifi-ap.config set wifi.interface-mode direct
1489+ $ wifi-ap.config set disabled 0
1490+ $ wifi-ap.config set wifi.security open
1491+ 4. Start the wifi-ap service:
1492+ $ sudo systemctl start snap.wifi-ap.backend
1493+ 5. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1494+ 6. Attempt to connect to the AP
1495+ 7. Stop the wifi-ap service:
1496+ $ sudo systemctl stop snap.wifi-ap.backend
1497+_verification:
1498+ Did the client connect?
1499+flags: preserve-locale
1500+
1501+unit: template
1502+template-resource: device
1503+template-filter: device.category == 'WIRELESS'
1504+template-unit: job
1505+id: after-suspend/wireless/wifi_ap_open_ad_no_sta_{interface}
1506+category_id: 2013.com.canonical.plainbox::suspend
1507+_summary: Create open 802.11ad Wi-Fi Access Point on {interface} with no STA after suspend
1508+plugin: manual
1509+requires:
1510+ wifi_interface_mode.AP == 'supported'
1511+ snap.name == 'wifi-ap'
1512+depends: suspend/suspend-manual
1513+estimated_duration: 120.0
1514+_purpose:
1515+ Check that the system can create an open 802.11ad Access Point without any STA connection after suspend
1516+_steps:
1517+ 1. Ensure no Soft AP is running prior running this test:
1518+ $ sudo systemctl stop snap.wifi-ap.backend
1519+ 2. Delete existing wireless connections known to Network Manager:
1520+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1521+ 3. Configure the wifi-ap snap:
1522+ $ wifi-ap.config set wifi.interface {interface}
1523+ $ wifi-ap.config set wifi.operation-mode ad
1524+ $ wifi-ap.config set wifi.interface-mode direct
1525+ $ wifi-ap.config set disabled 0
1526+ $ wifi-ap.config set wifi.security open
1527+ 4. Start the wifi-ap service:
1528+ $ sudo systemctl start snap.wifi-ap.backend
1529+ 5. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1530+ 6. Attempt to connect to the AP
1531+ 7. Stop the wifi-ap service:
1532+ $ sudo systemctl stop snap.wifi-ap.backend
1533+_verification:
1534+ Did the client connect?
1535+flags: preserve-locale
1536+
1537+unit: template
1538+template-resource: device
1539+template-filter: device.category == 'WIRELESS'
1540+template-unit: job
1541+id: after-suspend/wireless/wifi_ap_wpa_a_no_sta_{interface}
1542+category_id: 2013.com.canonical.plainbox::suspend
1543+depends: suspend/suspend-manual
1544+_summary: Create WPA2 802.11a Wi-Fi Access Point on {interface} with no STA after suspend
1545+plugin: manual
1546+requires:
1547+ wifi_interface_mode.AP == 'supported'
1548+ snap.name == 'wifi-ap'
1549+estimated_duration: 120.0
1550+_purpose:
1551+ Check that the system can create a WPA2 802.11a Access Point without any STA connection after suspend
1552+_steps:
1553+ 1. Ensure no Soft AP is running prior running this test:
1554+ $ sudo systemctl stop snap.wifi-ap.backend
1555+ 2. Delete existing wireless connections known to Network Manager:
1556+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1557+ 3. Configure the wifi-ap snap:
1558+ $ wifi-ap.config set wifi.interface {interface}
1559+ $ wifi-ap.config set wifi.operation-mode a
1560+ $ wifi-ap.config set wifi.interface-mode direct
1561+ $ wifi-ap.config set disabled 0
1562+ $ wifi-ap.config set wifi.security wpa2
1563+ $ wifi-ap.config set wifi.security-passphrase Test1234
1564+ 4. Start the wifi-ap service:
1565+ $ sudo systemctl start snap.wifi-ap.backend
1566+ 5. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1567+ 6. Attempt to connect to the AP using password "Test1234"
1568+ 7. Stop the wifi-ap service:
1569+ $ sudo systemctl stop snap.wifi-ap.backend
1570+_verification:
1571+ Did the client connect?
1572+flags: preserve-locale
1573+
1574+unit: template
1575+template-resource: device
1576+template-filter: device.category == 'WIRELESS'
1577+template-unit: job
1578+id: after-suspend/wireless/wifi_ap_wpa_b_no_sta_{interface}
1579+category_id: 2013.com.canonical.plainbox::suspend
1580+depends: suspend/suspend-manual
1581+_summary: Create WPA2 802.11b Wi-Fi Access Point on {interface} with no STA after suspend
1582+plugin: manual
1583+requires:
1584+ wifi_interface_mode.AP == 'supported'
1585+ snap.name == 'wifi-ap'
1586+estimated_duration: 120.0
1587+_purpose:
1588+ Check that the system can create a WPA2 802.11b Access Point without any STA connection after suspend
1589+_steps:
1590+ 1. Ensure no Soft AP is running prior running this test:
1591+ $ sudo systemctl stop snap.wifi-ap.backend
1592+ 2. Delete existing wireless connections known to Network Manager:
1593+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1594+ 3. Configure the wifi-ap snap:
1595+ $ wifi-ap.config set wifi.interface {interface}
1596+ $ wifi-ap.config set wifi.operation-mode b
1597+ $ wifi-ap.config set wifi.interface-mode direct
1598+ $ wifi-ap.config set disabled 0
1599+ $ wifi-ap.config set wifi.security wpa2
1600+ $ wifi-ap.config set wifi.security-passphrase Test1234
1601+ 4. Start the wifi-ap service:
1602+ $ sudo systemctl start snap.wifi-ap.backend
1603+ 5. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1604+ 6. Attempt to connect to the AP using password "Test1234"
1605+ 7. Stop the wifi-ap service:
1606+ $ sudo systemctl stop snap.wifi-ap.backend
1607+_verification:
1608+ Did the client connect?
1609+flags: preserve-locale
1610+
1611+unit: template
1612+template-resource: device
1613+template-filter: device.category == 'WIRELESS'
1614+template-unit: job
1615+id: after-suspend/wireless/wifi_ap_wpa_g_no_sta_{interface}
1616+category_id: 2013.com.canonical.plainbox::suspend
1617+_summary: Create WPA2 802.11g Wi-Fi Access Point on {interface} with no STA after suspend
1618+plugin: manual
1619+requires:
1620+ wifi_interface_mode.AP == 'supported'
1621+ snap.name == 'wifi-ap'
1622+depends: suspend/suspend-manual
1623+estimated_duration: 120.0
1624+_purpose:
1625+ Check that the system can create a WPA2 802.11g Access Point without any STA connection after suspend
1626+_steps:
1627+ 1. Ensure no Soft AP is running prior running this test:
1628+ $ sudo systemctl stop snap.wifi-ap.backend
1629+ 2. Delete existing wireless connections known to Network Manager:
1630+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1631+ 3. Configure the wifi-ap snap:
1632+ $ wifi-ap.config set wifi.interface {interface}
1633+ $ wifi-ap.config set wifi.operation-mode g
1634+ $ wifi-ap.config set wifi.interface-mode direct
1635+ $ wifi-ap.config set disabled 0
1636+ $ wifi-ap.config set wifi.security wpa2
1637+ $ wifi-ap.config set wifi.security-passphrase Test1234
1638+ 4. Start the wifi-ap service:
1639+ $ sudo systemctl start snap.wifi-ap.backend
1640+ 5. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1641+ 6. Attempt to connect to the AP using password "Test1234"
1642+ 7. Stop the wifi-ap service:
1643+ $ sudo systemctl stop snap.wifi-ap.backend
1644+_verification:
1645+ Did the client connect?
1646+flags: preserve-locale
1647+
1648+unit: template
1649+template-resource: device
1650+template-filter: device.category == 'WIRELESS'
1651+template-unit: job
1652+id: after-suspend/wireless/wifi_ap_wpa_ad_no_sta_{interface}
1653+category_id: 2013.com.canonical.plainbox::suspend
1654+_summary: Create WPA2 802.11ad Wi-Fi Access Point on {interface} with no STA after suspend
1655+plugin: manual
1656+requires:
1657+ wifi_interface_mode.AP == 'supported'
1658+ snap.name == 'wifi-ap'
1659+depends: suspend/suspend-manual
1660+estimated_duration: 120.0
1661+_purpose:
1662+ Check that the system can create a WPA2 802.11ad Access Point without any STA connection after suspend
1663+_steps:
1664+ 1. Ensure no Soft AP is running prior running this test:
1665+ $ sudo systemctl stop snap.wifi-ap.backend
1666+ 2. Delete existing wireless connections known to Network Manager:
1667+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1668+ 3. Configure the wifi-ap snap:
1669+ $ wifi-ap.config set wifi.interface {interface}
1670+ $ wifi-ap.config set wifi.operation-mode ad
1671+ $ wifi-ap.config set wifi.interface-mode direct
1672+ $ wifi-ap.config set disabled 0
1673+ $ wifi-ap.config set wifi.security wpa2
1674+ $ wifi-ap.config set wifi.security-passphrase Test1234
1675+ 4. Start the wifi-ap service:
1676+ $ sudo systemctl start snap.wifi-ap.backend
1677+ 5. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1678+ 6. Attempt to connect to the AP using password "Test1234"
1679+ 7. Stop the wifi-ap service:
1680+ $ sudo systemctl stop snap.wifi-ap.backend
1681+_verification:
1682+ Did the client connect?
1683+flags: preserve-locale
1684+
1685+unit: template
1686+template-resource: device
1687+template-filter: device.category == 'WIRELESS'
1688+template-unit: job
1689+id: after-suspend/wireless/wifi_ap_wpa_a_with_sta_{interface}
1690+category_id: 2013.com.canonical.plainbox::suspend
1691+_summary: Create WPA2 802.11a Wi-Fi Access Point on {interface} with active STA after suspend
1692+plugin: user-interact-verify
1693+requires:
1694+ wifi_interface_mode.AP == 'supported'
1695+ snap.name == 'wifi-ap'
1696+depends: after-suspend/wireless/wireless_connection_wpa_bg_nm_{interface}
1697+estimated_duration: 120.0
1698+environ: LD_LIBRARY_PATH WPA_BG_SSID WPA_BG_PSK
1699+command:
1700+ nmcli dev wifi rescan
1701+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1702+user: root
1703+_purpose:
1704+ Check that the system can create a WPA2 802.11a Access Point with an already active STA connection after suspend
1705+_steps:
1706+ 1. Ensure no Soft AP is running prior running this test:
1707+ $ sudo systemctl stop snap.wifi-ap.backend
1708+ 2. Delete existing wireless connections known to Network Manager:
1709+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1710+ 3. Connect to an 802.11b/g AP with wpa security:
1711+ Press Enter to continue
1712+ 4. Configure the wifi-ap snap:
1713+ $ wifi-ap.config set wifi.interface {interface}
1714+ $ wifi-ap.config set wifi.operation-mode a
1715+ $ wifi-ap.config set wifi.interface-mode virtual
1716+ $ wifi-ap.config set disabled 0
1717+ $ wifi-ap.config set wifi.security wpa2
1718+ $ wifi-ap.config set wifi.security-passphrase Test1234
1719+ $ wifi-ap.config set wifi.channel $(iw dev {interface} info | grep -oP 'channel\s+\K\d+')
1720+ 5. Start the wifi-ap service:
1721+ $ sudo systemctl start snap.wifi-ap.backend
1722+ 6. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1723+ 7. Attempt to connect to the AP using password "Test1234"
1724+ 8. Stop the wifi-ap service:
1725+ $ sudo systemctl stop snap.wifi-ap.backend
1726+_verification:
1727+ Did the client connect?
1728+flags: preserve-locale
1729+
1730+unit: template
1731+template-resource: device
1732+template-filter: device.category == 'WIRELESS'
1733+template-unit: job
1734+id: after-suspend/wireless/wifi_ap_wpa_b_with_sta_{interface}
1735+category_id: 2013.com.canonical.plainbox::suspend
1736+_summary: Create WPA2 802.11b Wi-Fi Access Point on {interface} with active STA after suspend
1737+plugin: user-interact-verify
1738+requires:
1739+ wifi_interface_mode.AP == 'supported'
1740+ snap.name == 'wifi-ap'
1741+depends: after-suspend/wireless/wireless_connection_wpa_bg_nm_{interface}
1742+estimated_duration: 120.0
1743+environ: LD_LIBRARY_PATH WPA_BG_SSID WPA_BG_PSK
1744+command:
1745+ nmcli dev wifi rescan
1746+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1747+user: root
1748+_purpose:
1749+ Check that the system can create a WPA2 802.11b Access Point with an already active STA connection after suspend
1750+_steps:
1751+ 1. Ensure no Soft AP is running prior running this test:
1752+ $ sudo systemctl stop snap.wifi-ap.backend
1753+ 2. Delete existing wireless connections known to Network Manager:
1754+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1755+ 3. Connect to an 802.11b/g AP with wpa security:
1756+ Press Enter to continue
1757+ 4. Configure the wifi-ap snap:
1758+ $ wifi-ap.config set wifi.interface {interface}
1759+ $ wifi-ap.config set wifi.operation-mode b
1760+ $ wifi-ap.config set wifi.interface-mode virtual
1761+ $ wifi-ap.config set disabled 0
1762+ $ wifi-ap.config set wifi.security wpa2
1763+ $ wifi-ap.config set wifi.security-passphrase Test1234
1764+ $ wifi-ap.config set wifi.channel $(iw dev {interface} info | grep -oP 'channel\s+\K\d+')
1765+ 5. Start the wifi-ap service:
1766+ $ sudo systemctl start snap.wifi-ap.backend
1767+ 6. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1768+ 7. Attempt to connect to the AP using password "Test1234"
1769+ 8. Stop the wifi-ap service:
1770+ $ sudo systemctl stop snap.wifi-ap.backend
1771+_verification:
1772+ Did the client connect?
1773+flags: preserve-locale
1774+
1775+unit: template
1776+template-resource: device
1777+template-filter: device.category == 'WIRELESS'
1778+template-unit: job
1779+id: after-suspend/wireless/wifi_ap_wpa_g_with_sta_{interface}
1780+category_id: 2013.com.canonical.plainbox::suspend
1781+_summary: Create WPA2 802.11g Wi-Fi Access Point on {interface} with active STA after suspend
1782+plugin: user-interact-verify
1783+requires:
1784+ wifi_interface_mode.AP == 'supported'
1785+ snap.name == 'wifi-ap'
1786+depends: after-suspend/wireless/wireless_connection_wpa_bg_nm_{interface}
1787+estimated_duration: 120.0
1788+environ: LD_LIBRARY_PATH WPA_BG_SSID WPA_BG_PSK
1789+command:
1790+ nmcli dev wifi rescan
1791+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1792+user: root
1793+_purpose:
1794+ Check that the system can create a WPA2 802.11g Access Point with an already active STA connection after suspend
1795+_steps:
1796+ 1. Ensure no Soft AP is running prior running this test:
1797+ $ sudo systemctl stop snap.wifi-ap.backend
1798+ 2. Delete existing wireless connections known to Network Manager:
1799+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1800+ 3. Connect to an 802.11b/g AP with wpa security:
1801+ Press Enter to continue
1802+ 4. Configure the wifi-ap snap:
1803+ $ wifi-ap.config set wifi.interface {interface}
1804+ $ wifi-ap.config set wifi.operation-mode g
1805+ $ wifi-ap.config set wifi.interface-mode virtual
1806+ $ wifi-ap.config set disabled 0
1807+ $ wifi-ap.config set wifi.security wpa2
1808+ $ wifi-ap.config set wifi.security-passphrase Test1234
1809+ $ wifi-ap.config set wifi.channel $(iw dev {interface} info | grep -oP 'channel\s+\K\d+')
1810+ 5. Start the wifi-ap service:
1811+ $ sudo systemctl start snap.wifi-ap.backend
1812+ 6. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1813+ 7. Attempt to connect to the AP using password "Test1234"
1814+ 8. Stop the wifi-ap service:
1815+ $ sudo systemctl stop snap.wifi-ap.backend
1816+_verification:
1817+ Did the client connect?
1818+flags: preserve-locale
1819+
1820+unit: template
1821+template-resource: device
1822+template-filter: device.category == 'WIRELESS'
1823+template-unit: job
1824+id: after-suspend/wireless/wifi_ap_wpa_ad_with_sta_{interface}
1825+category_id: 2013.com.canonical.plainbox::suspend
1826+_summary: Create WPA2 802.11ad Wi-Fi Access Point on {interface} with active STA after suspend
1827+plugin: user-interact-verify
1828+requires:
1829+ wifi_interface_mode.AP == 'supported'
1830+ snap.name == 'wifi-ap'
1831+depends: after-suspend/wireless/wireless_connection_wpa_bg_nm_{interface}
1832+estimated_duration: 120.0
1833+environ: LD_LIBRARY_PATH WPA_BG_SSID WPA_BG_PSK
1834+command:
1835+ nmcli dev wifi rescan
1836+ nmcli dev wifi connect $OPEN_BG_SSID ifname {interface} name WIFI_TEST_CREATED_BY_CHECKBOX
1837+user: root
1838+_purpose:
1839+ Check that the system can create a WPA2 802.11ad Access Point with an already active STA connection after suspend
1840+_steps:
1841+ 1. Ensure no Soft AP is running prior running this test:
1842+ $ sudo systemctl stop snap.wifi-ap.backend
1843+ 2. Delete existing wireless connections known to Network Manager:
1844+ $ network-manager.nmcli -t -f TYPE,UUID c | grep -oP "(?<=^802-11-wireless:).*" | xargs network-manager.nmcli c delete
1845+ 3. Connect to an 802.11b/g AP with wpa security:
1846+ Press Enter to continue
1847+ 4. Configure the wifi-ap snap:
1848+ $ wifi-ap.config set wifi.interface {interface}
1849+ $ wifi-ap.config set wifi.operation-mode ad
1850+ $ wifi-ap.config set wifi.interface-mode virtual
1851+ $ wifi-ap.config set disabled 0
1852+ $ wifi-ap.config set wifi.security wpa2
1853+ $ wifi-ap.config set wifi.security-passphrase Test1234
1854+ $ wifi-ap.config set wifi.channel $(iw dev {interface} info | grep -oP 'channel\s+\K\d+')
1855+ 5. Start the wifi-ap service:
1856+ $ sudo systemctl start snap.wifi-ap.backend
1857+ 6. Using a suitable Wi-Fi client try to detect the presence of the AP called "Ubuntu"
1858+ 7. Attempt to connect to the AP using password "Test1234"
1859+ 8. Stop the wifi-ap service:
1860+ $ sudo systemctl stop snap.wifi-ap.backend
1861+_verification:
1862+ Did the client connect?
1863+flags: preserve-locale
1864diff --git a/plainbox-provider-snappy/units/suspend/after-suspend/wwan.pxu b/plainbox-provider-snappy/units/suspend/after-suspend/wwan.pxu
1865new file mode 100644
1866index 0000000..a4b5fe7
1867--- /dev/null
1868+++ b/plainbox-provider-snappy/units/suspend/after-suspend/wwan.pxu
1869@@ -0,0 +1,48 @@
1870+# Copyright 2015 Canonical Ltd.
1871+# All rights reserved.
1872+#
1873+# Written by:
1874+# Jonathan Cave <jonathan.cave@canonical.com>
1875+# Po-Hsu Lin <po-hsu.lin@canonical.com>
1876+
1877+unit: job
1878+id: after-suspend/wwan/detect
1879+category_id: 2013.com.canonical.plainbox::suspend
1880+_summary: Identify if WWAN module is missing after suspend
1881+_purpose:
1882+ Tests that there is a WWAN module present and indicates that testing of it
1883+ should follow after suspend.
1884+plugin: shell
1885+command:
1886+ COUNT=$(wwan_tests count)
1887+ if [ $COUNT -eq 0 ]; then
1888+ exit 1
1889+ fi
1890+estimated_duration: 2.0
1891+flags: preserve-locale
1892+imports: from 2013.com.canonical.plainbox import manifest
1893+requires:
1894+ manifest.has_wwan_module == 'True'
1895+depends: suspend/suspend-manual
1896+
1897+unit: template
1898+template-resource: wwan_resource
1899+template-unit: job
1900+id: after-suspend/wwan/gsm-connection-{manufacturer}-{model}-{hw_id}
1901+_summary: Verify a GSM broadband modem can create a data connection after
1902+ suspend
1903+_description:
1904+ Any modems discovered by the resource job that list GSM support
1905+ will be tested to ensure a data connection can be made after suspend.
1906+plugin: shell
1907+command: wwan_tests 3gpp-connection $WWAN_CONTROL_IF $WWAN_NET_IF $WWAN_APN
1908+environ: LD_LIBRARY_PATH WWAN_CONTROL_IF WWAN_NET_IF WWAN_APN
1909+user: root
1910+estimated_duration: 10.0
1911+category_id: 2013.com.canonical.plainbox::suspend
1912+flags: preserve-locale
1913+imports: from 2013.com.canonical.plainbox import manifest
1914+requires:
1915+ manifest.has_wwan_module == 'True'
1916+ wwan_resource.gsm_umts == 'supported'
1917+depends: suspend/suspend-manual
1918diff --git a/plainbox-provider-snappy/units/suspend/jobs.pxu b/plainbox-provider-snappy/units/suspend/jobs.pxu
1919index 4352bae..515623d 100644
1920--- a/plainbox-provider-snappy/units/suspend/jobs.pxu
1921+++ b/plainbox-provider-snappy/units/suspend/jobs.pxu
1922@@ -8,418 +8,5 @@ _steps:
1923 _verification:
1924 System suspends successfully
1925 plugin: manual
1926-category_id: power
1927+category_id: 2013.com.canonical.plainbox::suspend
1928 estimated_duration: 300
1929-
1930-id: suspend/audio-after-suspend/headphone
1931-_summary: Headphones work (after suspend)
1932-_purpose:
1933- Check that headphones work after suspend
1934-_steps:
1935- 1. Plug in headset to headset port
1936- 2. Execute the following command:
1937- alsamixer
1938- 3. Use arrow key to adjust volume, m key to mute/unmute
1939- 4. Make sure all channels are not muted and have an appropriate volume
1940- 5. Press q to exit alsamixer
1941- 6. Suspend the device
1942- 7. Resume the device
1943- 6. Execute following command:
1944- arecord | aplay
1945- 7. Speak in to microphone on headset
1946-_verification:
1947- Verify that your voice is reproduced through the headphones clearly
1948-plugin: manual
1949-category_id: audio
1950-estimated_duration: 10
1951-
1952-id: suspend/audio-after-suspend/microphone
1953-_summary: External microphone works (after suspend)
1954-_purpose:
1955- Check that an external microphone works after suspend
1956-_steps:
1957- 1. Plug headset to headset port
1958- 2. Execute following command:
1959- alsamixer
1960- 3. Use arrow key to adjust volume, m key to mute/unmute
1961- 4. Make sure all channels are not muted and have an appropriate volume
1962- 5. Press q to exit alsamixer
1963- 6. Suspend the device
1964- 7. Resume the device
1965- 8. Execute following command:
1966- arecord | aplay
1967- 9. Speak in to microphone on headset
1968-_verification:
1969- Verify that your voice is reproduced through the headphones clearly
1970-plugin: manual
1971-category_id: audio
1972-estimated_duration: 10
1973-
1974-id: suspend/bluetooth-after-suspend/hid
1975-_summary: After suspend, bluetooth keyboard works
1976-_purpose:
1977- Check a bluetooth input device works after suspending the system. Given Ubuntu
1978- is CLI only, this implies a keyboard test.
1979-_steps:
1980- 1. Scan nearby devices:
1981- hcitool scan
1982- 2. Pair a bluetooth input device
1983- bluez-simple-agent hci0 [MAC address of bluetooth input device]
1984- 3. Set paired input device workable
1985- sudo bluez-test-input connect [MAC address of bluetooth input device]
1986- 4. Suspend the device
1987- 5. Resume the device
1988-_verification:
1989- Can input from input device
1990-plugin: manual
1991-category_id: bluetooth
1992-estimated_duration: 10
1993-
1994-id: suspend/ethernet/eth0/after-suspend/ping
1995-_summary: After suspend, can ping another machine over first Ethernet port
1996-_purpose:
1997- Check Ethernet works after suspend by pinging another machine
1998-_steps:
1999- 1. Make sure Ethernet cable is connected and can access internet
2000- 2. Suspend the device
2001- 3. Resume the device
2002- 4. ping -I eth0 google.com
2003-_verification:
2004- Can successfully get ping responses from google.com
2005-plugin: manual
2006-category_id: ethernet
2007-estimated_duration: 10
2008-
2009-id: suspend/ethernet/eth1/after-suspend/ping
2010-_summary: After suspend, can ping another machine over second Ethernet port
2011-_purpose:
2012- Check Ethernet works after suspend by pinging another machine
2013-_steps:
2014- 1. Make sure Ethernet cable is connected and can access internet
2015- 2. Suspend the device
2016- 3. Resume the device
2017- 4. ping -I eth1 google.com
2018-_verification:
2019- Can successfully get ping responses from google.com
2020-plugin: manual
2021-category_id: ethernet
2022-estimated_duration: 10
2023-
2024-id: suspend/led-after-suspend/power
2025-_summary: After suspend, Power LED behaves correctly
2026-_purpose:
2027- Check power LED is on when system is powered on after suspend
2028-_steps:
2029- 1. Suspend the device
2030- 2. Resume the device
2031- 3. Check power led when system is powered on
2032-_verification:
2033- Power led is on when system is powered on
2034-plugin: manual
2035-category_id: led
2036-estimated_duration: 10
2037-
2038-id: suspend/monitor-after-suspend/dvi
2039-_summary: After suspend, a Monitor works when connected by DVI
2040-_purpose:
2041- Check output to display through DVI port after suspend
2042-_steps:
2043- 1. Connect display to DVI port
2044- 2. Check the display
2045- 3. Suspend the device
2046- 4. Resume the device
2047-_verification:
2048- Output to display works
2049-plugin: manual
2050-category_id: display
2051-estimated_duration: 10
2052-
2053-id: suspend/monitor-after-suspend/hdmi
2054-_summary: After suspend , a Monitor works when connected by HDMI
2055-_purpose:
2056- Check output to display through HDMI port after suspend
2057-_steps:
2058- 1. Connect display to HDMI port
2059- 2. Check the display
2060- 3. Suspend the device
2061- 4. Resume the device
2062-_verification:
2063- Output to display works
2064-plugin: manual
2065-category_id: display
2066-estimated_duration: 10
2067-
2068-id: suspend/monitor-after-suspend/dvi-to-vga
2069-_summary: After suspend, a Monitor works when connected by DVI-to-VGA
2070-_purpose:
2071- Check output to display through VGA adaptor on DVI port after suspend
2072-_steps:
2073- 1. Connect display to VGA adaptor on DVI port
2074- 2. Check the display
2075- 3. Suspend the device
2076- 4. Resume the device
2077-_verification:
2078- Output to display works
2079-plugin: manual
2080-category_id: display
2081-estimated_duration: 10
2082-
2083-id: suspend/monitor-after-suspend/hdmi-to-vga
2084-_summary: After suspend, a Monitor works when connected by HDMI-to-VGA
2085-_purpose:
2086- Check output to display through VGA adaptor on HDMI port after suspend
2087-_steps:
2088- 1. Connect display to VGA adaptor on HDMI port
2089- 2. Check the display
2090- 3. Suspend the device
2091- 4. Resume the device
2092-_verification:
2093- Output to display works
2094-plugin: manual
2095-category_id: display
2096-estimated_duration: 10
2097-
2098-id: suspend/serial-after-suspend/rs232-console
2099-_summary: After suspend, the serial debugging console is enabled and operational
2100-_purpose:
2101- Check user can still access the test machine through serial port from another
2102- machine
2103-_steps:
2104- 1. Connect USB to db9 null modem adapter cable to serial port of test machine
2105- 2. Connect the cable to USB port of another ubuntu machine (client)
2106- 3. Install screen on client (if not done in Prerequisite)
2107- 4. Execute following command on client:
2108- sudo screen /dev/ttyUSB0
2109- 5. Start getty service on test machine:
2110- sudo systemctl start getty@[rs232 device, ex. /dev/ttyS0].service
2111- 6. Log into the test machine from terminal on client
2112- 7. Execute following command in screen on client:
2113- sudo systemctl suspend
2114- 8. Resume the test machine
2115- 9. Try to run some commands in terminal on client
2116-_verification:
2117- Can still run commands in terminal on client after suspend
2118-plugin: manual
2119-category_id: serial
2120-estimated_duration: 600
2121-
2122-id: suspend/usb-after-suspend/hid
2123-_summary: After suspend, USB keyboard works
2124-_purpose:
2125- Check USB input device works after suspend
2126-_steps:
2127- 1. Connect USB keyboard
2128- 2. Input some characters with the USB keyboard
2129- 3. Suspend the device
2130- 4. Wake the device
2131- 5. Input some characters with the USB keyboard
2132-_verification:
2133- Confirm the characters are displayed correctly
2134-plugin: manual
2135-category_id: usb2
2136-estimated_duration: 10
2137-
2138-id: suspend/usb-after-suspend/insert
2139-_summary: After suspend, USB storage device insertion detected
2140-_purpose:
2141- Check system can detect USB storage when inserted after suspend
2142-_steps:
2143- 1. Press continue
2144- 2. Connect USB storage device
2145-_verification:
2146- Can find new USB storage device messages in /var/log/syslog
2147-plugin: user-interact
2148-user: root
2149-command: checkbox-support-run_watcher insertion usb2
2150-category_id: usb2
2151-estimated_duration: 10
2152-
2153-id: suspend/usb-after-suspend/storage-automated
2154-_summary: After suspend, USB storage device read & write works
2155-_purpose:
2156- Check system can read/write to USB storage correctly after suspend
2157-_steps:
2158- 1. This task is fully automatic and need USB insertion test was applied first.
2159-_verification:
2160- This task is fully automatic and will verify the result for you.
2161-plugin: shell
2162-user: root
2163-command: usb_read_write
2164-category_id: usb2
2165-estimated_duration: 10
2166-
2167-id: suspend/usb-after-suspend/remove
2168-_summary: After suspend, USB storage removal works
2169-_purpose:
2170- Check system can detect removal of a USB storage device after suspend
2171-_steps:
2172- 1. Press continue
2173- 2. Disconnect USB storage device
2174-_verification:
2175- Can find USB storage device removed messages in /var/log/syslog
2176-plugin: user-interact
2177-user: root
2178-command: checkbox-support-run_watcher removal usb2
2179-category_id: usb2
2180-estimated_duration: 10
2181-
2182-id: suspend/usb3-after-suspend/insert
2183-_summary: After suspend, USB3 storage device insertion detected
2184-_purpose:
2185- Check system can detect insertion of a USB3 storage device after suspend
2186-_steps:
2187- 1. Press continue
2188- 2. Connect USB3 storage device
2189-_verification:
2190- Can find new USB3 storage device messages in /var/log/syslog
2191-plugin: user-interact
2192-user: root
2193-command: checkbox-support-run_watcher insertion usb3
2194-category_id: usb3
2195-estimated_duration: 10
2196-
2197-id: suspend/usb3-after-suspend/storage-automated
2198-_summary: After suspend, USB3 storage device read & write works
2199-_purpose:
2200- Check system can read/write to USB3 storage devices correctly after suspend
2201-_steps:
2202- 1. This task is fully automatic and need USB3 insertion test was applied first.
2203-_verification:
2204- This task is fully automatic and will verify the result for you.
2205-plugin: shell
2206-user: root
2207-command: usb_read_write
2208-category_id: usb3
2209-estimated_duration: 10
2210-
2211-id: suspend/usb3-after-suspend/remove
2212-_summary: After suspend, USB3 storage removal works
2213-_purpose:
2214- Check system can detect USB3 storage removal after suspend
2215-_steps:
2216- 1. Press continue
2217- 2. Disconnect USB3 storage device
2218-_verification:
2219- Can find USB3 storage device removed messages in /var/log/syslog
2220-plugin: user-interact
2221-user: root
2222-command: checkbox-support-run_watcher removal usb3
2223-category_id: usb3
2224-estimated_duration: 10
2225-
2226-id: suspend/wireless-after-suspend/wireless_scanning
2227-_summary: After suspend, System can discover Wi-Fi networks
2228-_purpose:
2229- Check system can find a wireless network AP nearby after suspend
2230-_steps:
2231- 1. sudo iw dev mlan0 scan
2232- 2. Suspend the device
2233- 3. Resume the device
2234- 4. sudo iw dev mlan0 scan
2235-_verification:
2236- In step 4, can see nearby wireless network AP
2237-plugin: manual
2238-category_id: wifi
2239-estimated_duration: 10
2240-
2241-id: suspend/wireless-after-suspend/wireless_connection_open_ac
2242-_summary: After suspend, system can connect to unencrypted 802.11ac Wi-Fi network
2243-_purpose:
2244- Check system can connect to insecure 802.11ac AP after suspend
2245-_steps:
2246- 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
2247- 2. Commence the test
2248-_verification:
2249- If there's "Connection test passed" message in result, mark the test as passed.
2250-plugin: user-interact
2251-command: wifi_client_test -i $WIFI_INTERFACE -s $OPEN_AC_SSID
2252-environ: WIFI_INTERFACE OPEN_AC_SSID
2253-user: root
2254-category_id: wifi
2255-estimated_duration: 90
2256-flags: preserve-locale
2257-
2258-id: suspend/wireless-after-suspend/wireless_connection_open_bg
2259-_summary: After suspend, system can connect to unencrypted 802.11b/g Wi-Fi network
2260-_purpose:
2261- Check system can connect to insecure 802.11b/g AP after suspend
2262-_steps:
2263- 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
2264- 2. Commence the test
2265-_verification:
2266- If there's "Connection test passed" message in result, mark the test as passed.
2267-plugin: user-interact
2268-command: wifi_client_test -i $WIFI_INTERFACE -s $OPEN_BG_SSID
2269-environ: WIFI_INTERFACE OPEN_BG_SSID
2270-user: root
2271-category_id: wifi
2272-estimated_duration: 90
2273-flags: preserve-locale
2274-
2275-id: suspend/wireless-after-suspend/wireless_connection_open_n
2276-_summary: After suspend, system can connect to unencrypted 802.11n Wi-Fi network
2277-_purpose:
2278- Check system can connect to insecure 802.11n AP after suspend
2279-_steps:
2280- 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
2281- 2. Commence the test
2282-_verification:
2283- If there's "Connection test passed" message in result, mark the test as passed.
2284-plugin: user-interact
2285-command: wifi_client_test -i $WIFI_INTERFACE -s $OPEN_N_SSID
2286-environ: WIFI_INTERFACE OPEN_N_SSID
2287-user: root
2288-category_id: wifi
2289-estimated_duration: 90
2290-flags: preserve-locale
2291-
2292-id: suspend/wireless-after-suspend/wireless_connection_wpa_ac
2293-_summary: After suspend, system can connect to WPA-encrypted 802.11ac Wi-Fi network
2294-_purpose:
2295- Check system can connect to 802.11ac AP with wpa security after suspend
2296-_steps:
2297- 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
2298- 2. Commence the test
2299-_verification:
2300- If there's "Connection test passed" message in result, mark the test as passed.
2301-plugin: user-interact
2302-command: wifi_client_test -i $WIFI_INTERFACE -s $WPA_AC_SSID -k $WPA_AC_PSK
2303-environ: WIFI_INTERFACE WPA_AC_SSID WPA_AC_PASK
2304-user: root
2305-category_id: wifi
2306-estimated_duration: 90
2307-flags: preserve-locale
2308-
2309-id: suspend/wireless-after-suspend/wireless_connection_wpa_bg
2310-_summary: After suspend, system can connect to WPA-encrypted 802.11b/g Wi-Fi network
2311-_purpose:
2312- Check system can connect to 802.11b/g AP with wpa security after suspend
2313-_steps:
2314- 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
2315- 2. Commence the test
2316-_verification:
2317- If there's "Connection test passed" message in result, mark the test as passed.
2318-plugin: user-interact
2319-command: wifi_client_test -i $WIFI_INTERFACE -s $WPA_BG_SSID -k $WPA_BG_PSK
2320-environ: WIFI_INTERFACE WPA_BG_SSID WPA_BG_PASK
2321-user: root
2322-category_id: wifi
2323-estimated_duration: 90
2324-flags: preserve-locale
2325-
2326-id: suspend/wireless-after-suspend/wireless_connection_wpa_n
2327-_summary: After suspend, system can connect to WPA-encrypted 802.11n Wi-Fi network
2328-_purpose:
2329- Check system can connect to 802.11n AP with wpa security after suspend
2330-_steps:
2331- 1. Remove all wireless configuration in /etc/network/interfaces and /etc/network/interfaces.d
2332- 2. Commence the test
2333-_verification:
2334- If there's "Connection test passed" message in result, mark the test as passed.
2335-plugin: user-interact
2336-command: wifi_client_test -i $WIFI_INTERFACE -s $WPA_N_SSID -k $WPA_N_PSK
2337-environ: WIFI_INTERFACE WPA_N_SSID WPA_N_PASK
2338-user: root
2339-category_id: wifi
2340-estimated_duration: 90
2341-flags: preserve-locale
2342diff --git a/plainbox-provider-snappy/units/suspend/test-plan.pxu b/plainbox-provider-snappy/units/suspend/test-plan.pxu
2343index 7920de9..3a0f43d 100644
2344--- a/plainbox-provider-snappy/units/suspend/test-plan.pxu
2345+++ b/plainbox-provider-snappy/units/suspend/test-plan.pxu
2346@@ -13,35 +13,32 @@ _name: Manual suspend tests
2347 _description: Manual suspend tests for Snappy Ubuntu Core devices
2348 include:
2349 suspend/suspend-manual
2350- suspend/audio-after-suspend/headphone
2351- suspend/audio-after-suspend/microphone
2352- suspend/bluetooth-after-suspend/hid
2353- suspend/ethernet/eth0/after-suspend/ping
2354- suspend/ethernet/eth1/after-suspend/ping
2355- suspend/ethernet/eth1/after-suspend/ping
2356- suspend/led-after-suspend/power
2357- suspend/monitor-after-suspend/dvi
2358- suspend/monitor-after-suspend/hdmi
2359- suspend/monitor-after-suspend/dvi-to-vga
2360- suspend/monitor-after-suspend/hdmi-to-vga
2361- suspend/serial-after-suspend/rs232-console
2362- suspend/usb-after-suspend/hid
2363- suspend/usb-after-suspend/insert
2364- suspend/usb-after-suspend/remove
2365- suspend/usb3-after-suspend/insert
2366- suspend/usb3-after-suspend/remove
2367- suspend/wireless-after-suspend/wireless_scanning
2368- suspend/wireless-after-suspend/wireless_connection_open_ac
2369- suspend/wireless-after-suspend/wireless_connection_open_bg
2370- suspend/wireless-after-suspend/wireless_connection_open_n
2371- suspend/wireless-after-suspend/wireless_connection_wpa_ac
2372- suspend/wireless-after-suspend/wireless_connection_wpa_bg
2373- suspend/wireless-after-suspend/wireless_connection_wpa_n
2374+ after-suspend/bluetooth/.*
2375+ after-suspend/led/.*
2376+ after-suspend/mediacard/.*-insert
2377+ after-suspend/mediacard/.*-storage
2378+ after-suspend/mediacard/.*-remove
2379+ after-suspend/monitor/.*
2380+ after-suspend/usb/.*
2381+ after-suspend/usb3/.*
2382+ after-suspend/usb-c/.*
2383+ after-suspend/watchdog/.*
2384
2385 id: suspend-automated
2386 unit: test plan
2387 _name: Automated suspend tests
2388 _description: Automated suspend tests for Snappy Ubuntu Core devices
2389 include:
2390- suspend/usb-after-suspend/storage-automated
2391- suspend/usb3-after-suspend/storage-automated
2392+ after-suspend/ethernet/.*
2393+ after-suspend/i2c/.*
2394+ after-suspend/location/.*
2395+ after-suspend/mediacard/.*-preinserted
2396+ after-suspend/wireless/wireless_scanning_.*
2397+ after-suspend/wireless/wireless_connection_open_ac_nm_.*
2398+ after-suspend/wireless/wireless_connection_open_bg_nm_.*
2399+ after-suspend/wireless/wireless_connection_open_n_nm_.*
2400+ after-suspend/wireless/wireless_connection_wpa_ac_nm_.*
2401+ after-suspend/wireless/wireless_connection_wpa_bg_nm_.*
2402+ after-suspend/wireless/wireless_connection_wpa_n_nm_.*
2403+ after-suspend/wwan/.*
2404+ after-suspend/watchdog/systemd-config
2405diff --git a/plainbox-provider-snappy/units/test-plan.pxu b/plainbox-provider-snappy/units/test-plan.pxu
2406index 5a0da47..82a838d 100644
2407--- a/plainbox-provider-snappy/units/test-plan.pxu
2408+++ b/plainbox-provider-snappy/units/test-plan.pxu
2409@@ -55,6 +55,7 @@ nested_part:
2410 watchdog-full
2411 wireless-full
2412 wwan-full
2413+ suspend-full
2414 stress-full
2415
2416 id: snappy-generic-automated

Subscribers

People subscribed via source and target branches

to all changes: