Dasharo Compatibility: Platform suspend and resume
Test cases common documentation
Test setup
- Proceed with the Generic test setup: firmware.
- Proceed with the Generic test setup: OS installer.
- Proceed with the Generic test setup: OS installation.
SUSP001.001 Platform suspend and resume (Ubuntu, wakeup flag)
Test description
This test aims to verify that the DUT platform suspend and resume functionality works correctly. As a way to wake up the device, the wakeup flag is tested in this case.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
=Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Install the
pm-utils
package:sudo apt-get install pm-utils
.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window and execute the following command to set the wakeup flag:
rtcwake --mode no --seconds 60
-
Execute the following command to enter the DUT into sleep mode:
pm-suspend
-
Wait 60 seconds.
- Log into the system again.
-
Execute the following command to get the results of suspend process:
cat /var/log/pm-suspend.log | grep 'suspend suspend: '
-
Execute the following command to get the results of resume process:
cat /var/log/pm-suspend.log | grep 'resume suspend: '
-
Note the results.
Expected result
- After entering the second command the DUT should enter sleep mode.
- The DUT should automatically awaken after 60 seconds.
-
The output of the third and fourth commands should contain information about suspend and resume procedure hooks' status. For none of them, an error message should be returned.
Example output for the suspend process:
/usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend: success. /usr/lib/pm-utils/sleep.d/000record-status suspend suspend: success. /usr/lib/pm-utils/sleep.d/00logging suspend suspend: success. /usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success. /etc/pm/sleep.d/10_grub-common suspend suspend: success. /etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success. /usr/lib/pm-utils/sleep.d/40inputattach suspend suspend: success. /usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend: success. /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success. /usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success. /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success. /usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Example output for the resume process:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success. /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success. /usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable. /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend: success. /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success. /usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable. /usr/lib/pm-utils/sleep.d/75modules resume suspend: success. /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success. /usr/lib/pm-utils/sleep.d/50unload_alx resume suspend: success. /usr/lib/pm-utils/sleep.d/40inputattach resume suspend: success. /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: success. /etc/pm/sleep.d/10_grub-common resume suspend: success. /usr/lib/pm-utils/sleep.d/00powersave resume suspend: success. /usr/lib/pm-utils/sleep.d/00logging resume suspend: success. /usr/lib/pm-utils/sleep.d/000record-status resume suspend: success. /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: success.
SUSP001.003 Platform suspend and resume (QubesOS, wakeup flag)
Test description
This test aims to verify that the DUT platform suspend and resume functionality works correctly. As a way to wake up the device, the wakeup flag is tested in this case.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= QubesOS stable
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window in
dom0
and execute the following command to set the wakeup flag:rtcwake --mode no --seconds 60
-
Execute the following command to enter the DUT into sleep mode:
sudo systemctl suspend
-
Wait 60 seconds.
- Log into the system again.
-
Execute the following command to get the results of process:
journalctl | grep systemd-sleep
-
Note the results.
Expected result
- After entering the
sudo systemctl suspend
command the DUT should enter sleep mode. -
The output of the second command should contain information about performed suspend and resume operations. Each suspend and resume of the system should be reported in the output of this command with the correct date, an example of reporting one suspend and resume operation:
Feb 10 16:38:55 dom0 systemd-sleep[14729]: Suspending system... Feb 10 16:39:10 dom0 systemd-sleep[14729]: System resumed.
SUSP002.001 Platform suspend and resume (Ubuntu, press key)
Test description
This test aims to verify that the DUT platform suspend and resume functionality works correctly. As a way to wake up the device, pressing any key on the keyboard is tested in this case.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
=Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Install the
pm-utils
package:sudo apt-get install pm-utils
.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window and execute the following command to enter DUT into sleep mode:
pm-suspend
-
Wait 15 seconds.
- Press any key on the keyboard to resume the system.
- Log into the system again.
-
Execute the following command to get the results of suspend process:
cat /var/log/pm-suspend.log | grep 'suspend suspend: '
-
Execute the following command to get the results of resume process:
cat /var/log/pm-suspend.log | grep 'resume suspend: '
-
Note the results.
Expected result
- After entering the first command the DUT should enter sleep mode.
-
The output of the second and third commands should contain information about suspend and resume procedure hooks' status. For none of them, an error message should be returned.
Example output for the suspend process:
/usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend: success. /usr/lib/pm-utils/sleep.d/000record-status suspend suspend: success. /usr/lib/pm-utils/sleep.d/00logging suspend suspend: success. /usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success. /etc/pm/sleep.d/10_grub-common suspend suspend: success. /etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success. /usr/lib/pm-utils/sleep.d/40inputattach suspend suspend: success. /usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend: success. /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success. /usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success. /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success. /usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Example output for the resume process:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success. /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success. /usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable. /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend: success. /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success. /usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable. /usr/lib/pm-utils/sleep.d/75modules resume suspend: success. /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success. /usr/lib/pm-utils/sleep.d/50unload_alx resume suspend: success. /usr/lib/pm-utils/sleep.d/40inputattach resume suspend: success. /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: success. /etc/pm/sleep.d/10_grub-common resume suspend: success. /usr/lib/pm-utils/sleep.d/00powersave resume suspend: success. /usr/lib/pm-utils/sleep.d/00logging resume suspend: success. /usr/lib/pm-utils/sleep.d/000record-status resume suspend: success. /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: success.
SUSP002.003 Platform suspend and resume (QubesOS, press key)
Test description
This test aims to verify that the DUT platform suspend and resume functionality works correctly. As a way to wake up the device, pressing any key on the keyboard is tested in this case.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= QubesOS stable
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window in
dom0
and execute the following command to enter the DUT into sleep mode:sudo systemctl suspend
-
Wait 15 seconds.
- Press any key on the keyboard to resume the system.
- Log into the system again.
-
Execute the following command to get the results of process:
journalctl | grep systemd-sleep
-
Note the results.
Expected result
- After entering the first command the DUT should enter sleep mode.
-
The output of the second command should contain information about performed suspend and resume operations. Each suspend and resume of the system should be reported in the output of this command with the correct date, an example of reporting one suspend and resume operation:
Feb 10 16:38:55 dom0 systemd-sleep[14729]: Suspending system... Feb 10 16:39:10 dom0 systemd-sleep[14729]: System resumed.
SUSP003.001 Platform suspend and resume (Ubuntu, push power button)
Test description
This test aims to verify that the DUT platform suspend and resume functionality works correctly. As a way to wake up the device, pushing the power button is tested in this case.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
=Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Install the
pm-utils
package:sudo apt-get install pm-utils
.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window and execute the following command to enter DUT into sleep mode:
pm-suspend
-
Wait 15 seconds.
- Push the power button to resume the system.
- Log into the system again.
-
Execute the following command to get the results of suspend process:
cat /var/log/pm-suspend.log | grep 'suspend suspend: '
-
Execute the following command to get the results of resume process:
cat /var/log/pm-suspend.log | grep 'resume suspend: '
-
Note the results.
Expected result
- After entering the first command the DUT should enter sleep mode.
-
The output of the second and third commands should contain information about suspend and resume procedure hooks' status. For none of them, an error message should be returned.
Example output for the suspend process:
/usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend: success. /usr/lib/pm-utils/sleep.d/000record-status suspend suspend: success. /usr/lib/pm-utils/sleep.d/00logging suspend suspend: success. /usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success. /etc/pm/sleep.d/10_grub-common suspend suspend: success. /etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success. /usr/lib/pm-utils/sleep.d/40inputattach suspend suspend: success. /usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend: success. /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success. /usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success. /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success. /usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Example output for the resume process:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success. /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success. /usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable. /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend: success. /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success. /usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable. /usr/lib/pm-utils/sleep.d/75modules resume suspend: success. /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success. /usr/lib/pm-utils/sleep.d/50unload_alx resume suspend: success. /usr/lib/pm-utils/sleep.d/40inputattach resume suspend: success. /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: success. /etc/pm/sleep.d/10_grub-common resume suspend: success. /usr/lib/pm-utils/sleep.d/00powersave resume suspend: success. /usr/lib/pm-utils/sleep.d/00logging resume suspend: success. /usr/lib/pm-utils/sleep.d/000record-status resume suspend: success. /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: success.
SUSP003.003 Platform suspend and resume (QubesOS, push power button)
Test description
This test aims to verify that the DUT platform suspend and resume functionality works correctly. As a way to wake up the device, pushing the power button is tested in this case.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= QubesOS stable
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window in
dom0
and execute the following command to enter the DUT into sleep mode:sudo systemctl suspend
-
Wait 15 seconds.
- Push the power button to resume the system.
- Log into the system again.
-
Execute the following command to get the results of process:
journalctl | grep systemd-sleep
-
Note the results.
Expected result
- After entering the first command the DUT should enter sleep mode.
-
The output of the second command should contain information about performed suspend and resume operations. Each suspend and resume of the system should be reported in the output of this command with the correct date, an example of reporting one suspend and resume operation:
Feb 10 16:38:55 dom0 systemd-sleep[14729]: Suspending system... Feb 10 16:39:10 dom0 systemd-sleep[14729]: System resumed.
SUSP004.001 Platform suspend and resume (Ubuntu, Wake-on-LAN)
Test description
This test aims to verify that the DUT platform suspend and resume functionality works correctly. As a way to wake up the device, the Wake-on-LAN mechanism is tested in this case.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
=Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Install the
pm-utils
package:sudo apt-get install pm-utils
.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window and execute the following command to obtain the device lowest MAC address:
ip address
Note, that the output of the above command might include information about all communication interfaces with their MAC addresses. In the Wake-on-LAN procedure, only the lowest MAC address of the active interface will be needed.
-
Execute the following command to enter DUT into sleep mode:
pm-suspend
-
Wait 15 seconds.
-
On another active machine execute the following command to send a magic pocket:
wakeonlan <DUT MAC address>
-
Log into the system (on the DUT) again.
-
Execute the following command to get the results of suspend process:
cat /var/log/pm-suspend.log | grep 'suspend suspend: '
-
Execute the following command to get the results of resume process:
cat /var/log/pm-suspend.log | grep 'resume suspend: '
-
Note the results.
Expected result
- After entering the first command the DUT should enter sleep mode.
-
The output of the second and third commands should contain information about suspend and resume procedure hooks' status. For none of them, an error message should be returned.
Example output for the suspend process:
/usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend: success. /usr/lib/pm-utils/sleep.d/000record-status suspend suspend: success. /usr/lib/pm-utils/sleep.d/00logging suspend suspend: success. /usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success. /etc/pm/sleep.d/10_grub-common suspend suspend: success. /etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success. /usr/lib/pm-utils/sleep.d/40inputattach suspend suspend: success. /usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend: success. /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success. /usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success. /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable. /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success. /usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Example output for the resume process:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success. /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success. /usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable. /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend: success. /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success. /usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable. /usr/lib/pm-utils/sleep.d/75modules resume suspend: success. /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success. /usr/lib/pm-utils/sleep.d/50unload_alx resume suspend: success. /usr/lib/pm-utils/sleep.d/40inputattach resume suspend: success. /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: success. /etc/pm/sleep.d/10_grub-common resume suspend: success. /usr/lib/pm-utils/sleep.d/00powersave resume suspend: success. /usr/lib/pm-utils/sleep.d/00logging resume suspend: success. /usr/lib/pm-utils/sleep.d/000record-status resume suspend: success. /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: success.
SUSP005.001 Cyclic platform suspend and resume (Ubuntu)
Test description
This test aims to verify that the DUT platform suspend and resume procedure performed cyclically works correctly.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
=Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Install the Firmware test suite package.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window and execute the following command:
sudo fwts s3 --results-output=stderr
Note: suspend test duration is set defaultly to 30 seconds. After that time the device should be woken up automatically.
-
Log into the system again.
- Note the results.
- Repeat steps 4-6 to determine the stability of suspend and resume procedure.
Expected result
Each time, the suspend and resume procedure is performed, the output of the
command should contain information about test results (section
Test Failure Summary
).
The test case passes only if after every iteration of the suspend and resume
procedure the summary section shows that all minor tests included in s3
test
have been passed.
Example output for one iteration:
Test Failure Summary
================================================================================
Critical failures: NONE
High failures: NONE
Medium failures: NONE
Low failures: NONE
Other failures: NONE
Test |Pass |Fail |Abort|Warn |Skip |Info |
---------------+-----+-----+-----+-----+-----+-----+
s3 | 9| | | | | |
---------------+-----+-----+-----+-----+-----+-----+
Total: | 9| 0| 0| 0| 0| 0|
---------------+-----+-----+-----+-----+-----+-----+