SuspendResumeTesting

In line with the Jaunty bug fixing goal we are focusing on suspend/resume with a view to detecting existing bugs and regressions for the release. To this end we have created suspend/resume test script to automate extended testing of suspend/resume. In combination with the new automated resume failure detecting we can test and automatically report bugs.

How to run Suspend/Resume stress test

The test script is packaged in checkbox version 0.7. Assuming checkbox version 0.7 is installed, the script can be found at /usr/share/checkbox/scripts/suspend_test . Run the script as follows:

  • sudo bash /usr/share/checkbox/scripts/suspend_test --full

Alternatively, download the suspend/resume test script from http://people.ubuntu.com/~apw/suspend-resume/test-suspend, and then run it:

  • wget http://people.ubuntu.com/~apw/suspend-resume/test-suspend
    sudo bash test-suspend --full

Note: Some users reported, that automatic wake up only works if your systems RTC is set to UTC, not local time.

This will perform a number of suspend/resume tests. The first few of these require human intervention such as unplugging the AC cord and replacing it. Once the main stress test starts no further intervention will be needed.

A sample run is shown below:

  • This script will attempt to suspend and resume your computer a number of times.
    Should the machine fail to resume, first attempt to manually resume it.  If
    that fails power your system off and on which will generate an apport bug
    report automatically.
    
    Press CTRL-C now to abort testing ...
    
    *** TEST 1 -- please ensure your AC cord is detached
    *** TEST 1 -- machine will suspend for 20 seconds, press return when ready
    
    
    Suspend Test starting on 2009-02-05 10:24:59 (1 cycles)
    Suspend iteration 1 of 1
    wait for 10 seconds
    Suspend Test completed
    
    *** TEST 2 -- please ensure your AC cord is attached
    *** TEST 2 -- machine will suspend for 20 seconds, press return when ready
    
    
    Suspend Test starting on 2009-02-05 10:25:42 (1 cycles)
    Suspend iteration 1 of 1
    wait for 10 seconds
    Suspend Test completed
    
    *** TEST 3 -- please remove the AC cord while the machine is suspended
    *** TEST 3 -- machine will suspend for 20 seconds, press return when ready
    
    
    Suspend Test starting on 2009-02-05 10:33:27 (1 cycles)
    Suspend iteration 1 of 1
    wait for 10 seconds
    Suspend Test completed
    
    *** TEST 4 -- please insert the AC cord while the machine is suspended
    *** TEST 4 -- machine will suspend for 20 seconds, press return when ready
    
    
    Suspend Test starting on 2009-02-05 10:37:37 (1 cycles)
    Suspend iteration 1 of 1
    wait for 10 seconds
    Suspend Test completed
    
    *** TEST 5 -- exhaustive 60 iteration variable delay suspend/resume stress test
    *** TEST 5 -- machine will suspend for 20 seconds, press return when ready
    *** NOTE: there will be no further user interaction from this point
    
    
    *** delay 60 ...
    Suspend Test starting on 2009-02-05 10:38:35 (1 cycles)
    Suspend iteration 1 of 1
    wait for 60 seconds
    Suspend Test completed
    *** delay 58 ...
    Suspend Test starting on 2009-02-05 10:40:05 (1 cycles)
    Suspend iteration 1 of 1
    wait for 58 seconds
    Suspend Test completed
    *** delay 56 ...
    Suspend Test starting on 2009-02-05 10:41:33 (1 cycles)
    Suspend iteration 1 of 1
    wait for 56 seconds
    Suspend Test completed
    *** delay 54 ...
    Suspend Test starting on 2009-02-05 10:42:59 (1 cycles)
    Suspend iteration 1 of 1
    wait for 54 seconds
    Suspend Test completed
    *** delay 52 ...
    Suspend Test starting on 2009-02-05 10:44:21 (1 cycles)
    Suspend iteration 1 of 1
    wait for 52 seconds
    Suspend Test completed
    *** delay 50 ...
    Suspend Test starting on 2009-02-05 10:45:41 (1 cycles)
    Suspend iteration 1 of 1
    wait for 50 seconds
    Suspend Test completed
    *** delay 48 ...
    Suspend Test starting on 2009-02-05 10:46:59 (1 cycles)
    Suspend iteration 1 of 1
    wait for 48 seconds
    Suspend Test completed
    *** delay 46 ...
    Suspend Test starting on 2009-02-05 10:48:15 (1 cycles)
    Suspend iteration 1 of 1
    wait for 46 seconds
    Suspend Test completed
    *** delay 44 ...
    Suspend Test starting on 2009-02-05 10:49:29 (1 cycles)
    Suspend iteration 1 of 1
    wait for 44 seconds
    Suspend Test completed
    *** delay 42 ...
    Suspend Test starting on 2009-02-05 10:50:41 (1 cycles)
    Suspend iteration 1 of 1
    wait for 42 seconds
    Suspend Test completed
    *** delay 40 ...
    Suspend Test starting on 2009-02-05 10:51:51 (1 cycles)
    Suspend iteration 1 of 1
    wait for 40 seconds
    Suspend Test completed
    *** delay 38 ...
    Suspend Test starting on 2009-02-05 10:52:59 (1 cycles)
    Suspend iteration 1 of 1
    wait for 38 seconds
    Suspend Test completed
    *** delay 36 ...
    Suspend Test starting on 2009-02-05 10:54:05 (1 cycles)
    Suspend iteration 1 of 1
    wait for 36 seconds
    Suspend Test completed
    *** delay 34 ...
    Suspend Test starting on 2009-02-05 10:55:09 (1 cycles)
    Suspend iteration 1 of 1
    wait for 34 seconds
    Suspend Test completed
    *** delay 32 ...
    Suspend Test starting on 2009-02-05 10:56:11 (1 cycles)
    Suspend iteration 1 of 1
    wait for 32 seconds
    Suspend Test completed
    *** delay 30 ...
    Suspend Test starting on 2009-02-05 10:57:10 (1 cycles)
    Suspend iteration 1 of 1
    wait for 30 seconds
    Suspend Test completed
    *** delay 28 ...
    Suspend Test starting on 2009-02-05 10:58:08 (1 cycles)
    Suspend iteration 1 of 1
    wait for 28 seconds
    Suspend Test completed
    *** delay 26 ...
    Suspend Test starting on 2009-02-05 10:59:06 (1 cycles)
    Suspend iteration 1 of 1
    wait for 26 seconds
    Suspend Test completed
    *** delay 24 ...
    Suspend Test starting on 2009-02-05 11:00:02 (1 cycles)
    Suspend iteration 1 of 1
    wait for 24 seconds
    Suspend Test completed
    *** delay 22 ...
    Suspend Test starting on 2009-02-05 11:00:54 (1 cycles)
    Suspend iteration 1 of 1
    wait for 22 seconds
    Suspend Test completed
    *** delay 20 ...
    Suspend Test starting on 2009-02-05 11:01:44 (1 cycles)
    Suspend iteration 1 of 1
    wait for 20 seconds
    Suspend Test completed
    *** delay 18 ...
    Suspend Test starting on 2009-02-05 11:02:32 (1 cycles)
    Suspend iteration 1 of 1
    wait for 18 seconds
    Suspend Test completed
    *** delay 16 ...
    Suspend Test starting on 2009-02-05 11:03:18 (1 cycles)
    Suspend iteration 1 of 1
    wait for 16 seconds
    Suspend Test completed
    *** delay 14 ...
    Suspend Test starting on 2009-02-05 11:04:02 (1 cycles)
    Suspend iteration 1 of 1
    wait for 14 seconds
    Suspend Test completed
    *** delay 12 ...
    Suspend Test starting on 2009-02-05 11:04:44 (1 cycles)
    Suspend iteration 1 of 1
    wait for 12 seconds
    Suspend Test completed
    *** delay 10 ...
    Suspend Test starting on 2009-02-05 11:05:24 (1 cycles)
    Suspend iteration 1 of 1
    wait for 10 seconds
    Suspend Test completed
    *** delay 8 ...
    Suspend Test starting on 2009-02-05 11:06:01 (1 cycles)
    Suspend iteration 1 of 1
    wait for 8 seconds
    Suspend Test completed
    *** delay 6 ...
    Suspend Test starting on 2009-02-05 11:06:37 (1 cycles)
    Suspend iteration 1 of 1
    wait for 6 seconds
    Suspend Test completed
    *** delay 4 ...
    Suspend Test starting on 2009-02-05 11:07:11 (1 cycles)
    Suspend iteration 1 of 1
    wait for 4 seconds
    Suspend Test completed
    *** delay 2 ...
    Suspend Test starting on 2009-02-05 11:07:42 (1 cycles)
    Suspend iteration 1 of 1
    wait for 2 seconds
    Suspend Test completed
    test@test-laptop:~$ 

Reporting Results

Please add your hardware information and test results to https://wiki.ubuntu.com/KernelTeam/SuspendResumeTesting/Feedback

Reporting Bugs

Should a failure occur while running the suspend/resume test, upon rebooting apport should automatically detect the failure and ask that a bug report be filed in Launchpad. Apport will try to gather as much information from the system and include it in the bug report.

See also

* DebuggingKernelSuspendHibernateResume

KernelTeam/SuspendResumeTesting (last edited 2011-07-27 22:06:53 by c-24-7-86-43)