~bladernr/checkbox/1095713-set-pipefail-on-sleep-jobs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
plugin: shell
name: network_before_suspend
depends: network_test
_description: Test the network before suspending.
command: network_check -a

plugin: shell
name: resolution_before_suspend
_description: Record the current resolution before suspending.
command: xrandr -q |grep '*'| awk '{print $1}' > $CHECKBOX_DATA/resolution_before_suspend.txt

plugin: shell
name: audio_before_suspend
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
_description: Test the audio before suspending.
command: amixer > $CHECKBOX_DATA/audio_before_suspend.txt

plugin: manual
name: wireless_before_suspend
command: internet_test
_description:
 Wireless network connection procedure:
  1.- Click on the Network Manager applet.
  2.- Click on Disconnect under 'Wired Networks'.
  3.- Select a network below the 'Wireless networks' section.
  4.- Notify OSD should confirm that the connection has been established.
  5.- Select Test to verify connection and throughput.
 Output:
 .
 $output
 .
 Is this correct?

plugin: manual
name: bluetooth_detect_before_suspend
requires: package.name == 'bluez'
command: hcitool dev | tail -n+2 | awk '{print $2}'
_description:
 The address of your Bluetooth device is:
 $output
 .
 Is this correct?

plugin: manual
name: bluetooth_mouse_before_suspend
depends: bluetooth_detect_before_suspend
_description:
 Verify a bluetooth peripheral.  An example verification procedure for a bluetooth mouse is given.
 .
 Bluetooth mouse procedure:
  1.- Enable the bluetooth mouse.
  2.- Click on the bluetooth icon in the menu bar.
  3.- Select 'Setup new device'.
  4.- Look for the device in the list and select it.
  5.- Move the mouse around the screen.
  6.- Perform some single/double/right click operations.
 .
 Did all the steps work?

plugin: shell
name: rtc
requires: package.name == 'linux'
command:
 test -e /dev/rtc
_description:
 Make sure that the RTC (Real-Time Clock) device exists.

plugin: manual
name: sleep_state_test
depends: rtc network_before_suspend resolution_before_suspend wireless_before_suspend bluetooth_detect_before_suspend bluetooth_mouse_before_suspend
requires: package.name == 'pm-utils'
_description:
 Power management Suspend and Resume test
 .
 Select Test and your system will suspend for about 30 - 60 seconds. If your system does not wake itself up after 60 seconds, please press the power button momentarily to wake the system manually. If your system fails to wake at all and must be rebooted, restart System Testing after reboot and mark this test as Failed.
user: root
command: sleep_test -d

plugin: shell
name: network_after_suspend
depends: sleep_state_test network_before_suspend
_description: Test the network after resuming.
command: internet_test

plugin: shell
name: resolution_after_suspend
depends: sleep_state_test resolution_before_suspend
_description: Test to see that we have the same resolution after resuming as before.
command: xrandr -q |grep '*'| awk '{print $1}' | diff $CHECKBOX_DATA/resolution_before_suspend.txt -

plugin: shell
name: audio_after_suspend
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
depends: sleep_state_test audio_before_suspend
_description: Test the audio after resuming.
command: amixer | diff $CHECKBOX_DATA/audio_before_suspend.txt -

plugin: manual
name: wireless_after_suspend
depends: sleep_state_test wireless_before_suspend
command: internet_test
_description:
 Wireless network connection procedure:
  1.- Click on the Network Manager applet.
  2.- If a wired connection is established, click its Disconnect option.
  3.- Select a network below the 'Wireless networks' section.
  4.- Notify OSD should confirm that the connection has been established.
  5.- Select Test to verify connection and throughput.
 Output:
 .
 $output
 .
 Is this correct?

plugin: manual
name: bluetooth_detect_after_suspend
depends: sleep_state_test bluetooth_detect_before_suspend
requires: package.name == 'bluez'
command: hcitool dev | tail -n+2 | awk '{print $2}'
_description:
 The address of your Bluetooth device is:
 $output
 .
 Is this correct?

plugin: manual
name: bluetooth_mouse_after_suspend
depends: sleep_state_test bluetooth_detect_after_suspend
_description:
 Verify a bluetooth peripheral.  An example verification procedure for a bluetooth mouse is given.
 .
 Bluetooth mouse procedure:
  1.- Enable the bluetooth mouse.
  2.- Click on the bluetooth icon in the menu bar.
  3.- Select 'Setup new device'.
  4.- Look for the device in the list and select it.
  5.- Move the mouse around the screen.
  6.- Perform some single/double/right click operations.
 .
 Did all the steps work?

plugin: manual
name: cycle_resolutions_after_suspend
depends: sleep_state_test xrandr_cycle
_description:
 This test will check to make sure that supported video modes work after a suspend and resume.  Select Test to begin.
command: xrandr_cycle

plugin: manual
name: record_playback_after_suspend
depends: sleep_state_test
requires:
 device.category == 'AUDIO'
 package.name == 'alsa-base'
command: alsa_record_playback
_description:
 This will check to make sure that your audio device works properly after a suspend and resume.  You can use either internal or external microphone and speakers.
 .
 To execute this test, make sure your speaker and microphone are NOT muted and the volume is set sufficiently loud to record and play audio. Select Test and then speak into your microphone. After a few seconds, your speech will be played back to you.
 .
 Did you hear your speech played back?

plugin: manual
name: suspend_30_cycles
depends: rtc
requires: package.name == 'pm-utils'
user: root
command: sleep_test -i 30 -s mem --debug
_description:
 Enter and resume from suspend state for 30 iterations. Please note that this is a lengthy test. Select Test to begin. If your system fails to wake and must be rebooted, please restart System Testing and mark this test as Failed.
 .
 Did the system successfully suspend and resume for 30 iterations?

plugin: manual
name: hibernate_once
depends: rtc
requires: package.name == 'pm-utils'
user: root
command: sleep_test -s disk -w 120 --debug
_description:
 This will check to make sure your system can successfully hibernate (if supported).
 .
 Select Test to begin. The system will hibernate and should wake itself within 5 minutes.  If your system does not wake itself after 5 minutes, please press the power button to wake the system manually. If the system fails to resume from hibernate, please restart System Testing and mark this test as Failed.
 .
 Did the system successfully hibernate and did it work properly after waking up?

plugin: manual
name: hibernate_30_cycles
depends: rtc
requires: package.name == 'pm-utils'
user: root
command: sleep_test -i 30 -s disk -w 120 --debug
_description:
 Enter and resume from hibernate for 30 iterations. Please note that this is a very lengthy test. Also, if your system does not wake itself after 2 minutes, you will need to press the power button to wake the system up. If the system fails to resume from hibernation and must be rebooted, please restart System Testing and mark this test as Failed.
 .
 Also, you will need to ensure your system has no power-on or HDD passwords set, and that grub is set to boot Ubuntu by default if you have a multi-boot set-up.
 .
 Did the system successfully hibernate and wake 30 times?