Skip to content

Dasharo Compatibility: Platform suspend and resume

Test cases common documentation

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.

SUSP001.001 Platform suspend and resume (Ubuntu 22.04, 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

  1. FIRMWARE = Dasharo
  2. OPERATING_SYSTEM = Ubuntu 22.04

Test setup

  1. Proceed with the Test cases common documentation section.
  2. Install the pm-utils package: sudo apt-get install pm-utils.

Test steps

  1. Power on the DUT.
  2. Boot into the system.
  3. Log into the system by using the proper login and password.
  4. Open a terminal window and execute the following command to set the wakeup flag:

    rtcwake --mode no --seconds 60
    
  5. Execute the following command to enter the DUT into sleep mode:

    pm-suspend
    
  6. Wait 60 seconds.

  7. Log into the system again.
  8. Execute the following command to get the results of suspend process:

    cat /var/log/pm-suspend.log | grep 'suspend suspend: '
    
  9. Execute the following command to get the results of resume process:

    cat /var/log/pm-suspend.log | grep 'suspend resume: '
    
  10. Note the results.

Expected result

  1. After entering the second command the DUT should enter sleep mode.
  2. The DUT should automatically awaken after 60 seconds.
  3. 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.
    

SUSP002.001 Platform suspend and resume (Ubuntu 22.04, 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

  1. FIRMWARE = Dasharo
  2. OPERATING_SYSTEM = Ubuntu 22.04

Test setup

  1. Proceed with the Test cases common documentation section.
  2. Install the pm-utils package: sudo apt-get install pm-utils.

Test steps

  1. Power on the DUT.
  2. Boot into the system.
  3. Log into the system by using the proper login and password.
  4. Open a terminal window and execute the following command to enter DUT into sleep mode:

    pm-suspend
    
  5. Wait 15 seconds.

  6. Press any key on the keyboard to resume the system.
  7. Log into the system again.
  8. Execute the following command to get the results of suspend process:

    cat /var/log/pm-suspend.log | grep 'suspend suspend: '
    
  9. Execute the following command to get the results of resume process:

    cat /var/log/pm-suspend.log | grep 'suspend resume: '
    
  10. Note the results.

Expected result

  1. After entering the first command the DUT should enter sleep mode.
  2. 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.001 Platform suspend and resume (Ubuntu 22.04, 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

  1. FIRMWARE = Dasharo
  2. OPERATING_SYSTEM = Ubuntu 22.04

Test setup

  1. Proceed with the Test cases common documentation section.
  2. Install the pm-utils package: sudo apt-get install pm-utils.

Test steps

  1. Power on the DUT.
  2. Boot into the system.
  3. Log into the system by using the proper login and password.
  4. Open a terminal window and execute the following command to enter DUT into sleep mode:

    pm-suspend
    
  5. Wait 15 seconds.

  6. Push the power button to resume the system.
  7. Log into the system again.
  8. Execute the following command to get the results of suspend process:

    cat /var/log/pm-suspend.log | grep 'suspend suspend: '
    
  9. Execute the following command to get the results of resume process:

    cat /var/log/pm-suspend.log | grep 'suspend resume: '
    
  10. Note the results.

Expected result

  1. After entering the first command the DUT should enter sleep mode.
  2. 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.
    

SUSP004.001 Platform suspend and resume (Ubuntu 22.04, 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

  1. FIRMWARE = Dasharo
  2. OPERATING_SYSTEM = Ubuntu 22.04

Test setup

  1. Proceed with the Test cases common documentation section.
  2. Install the pm-utils package: sudo apt-get install pm-utils.

Test steps

  1. Power on the DUT.
  2. Boot into the system.
  3. Log into the system by using the proper login and password.
  4. 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.

  5. Execute the following command to enter DUT into sleep mode:

    pm-suspend
    
  6. Wait 15 seconds.

  7. On another active machine execute the following command to send a magic pocket:

    wakeonlan <DUT MAC address>
    
  8. Log into the system (on the DUT) again.

  9. Execute the following command to get the results of suspend process:

    cat /var/log/pm-suspend.log | grep 'suspend suspend: '
    
  10. Execute the following command to get the results of resume process:

    cat /var/log/pm-suspend.log | grep 'suspend resume: '
    
  11. Note the results.

Expected result

  1. After entering the first command the DUT should enter sleep mode.
  2. 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 22.04)

Test description

This test aims to verify that the DUT platform suspend and resume procedure performed cyclically works correctly.

Test configuration data

  1. FIRMWARE = Dasharo
  2. OPERATING_SYSTEM = Ubuntu 22.04

Test setup

  1. Proceed with the Test cases common documentation section.
  2. Install the Firmware test suite package.

Test steps

  1. Power on the DUT.
  2. Boot into the system.
  3. Log into the system by using the proper login and password.
  4. 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.

  5. Log into the system again.

  6. Note the results.
  7. 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|
---------------+-----+-----+-----+-----+-----+-----+