s3

Revision 1 as of 2011-08-22 13:37:17

Clear message

Firmware Test Suite - s3 test

This test exercises suspend/resume (S3). The S3 test uses the pm-utils pm-suspend command to initiate the suspend. By default the test will suspend the machine and 30 seconds later will use the ACPI wakealarm to automatically resume. One can specify multiple S3 cycles and also specify the delay between initiating each suspend cycle and vary this time between a minimum and maximum time and increasing per cycle by a specified delay delta. This allows one to initiate suspend over a range of times to catch bugs such as wifi re-associating during a suspend.

The test can be used to soak test S3 with various extra options:

--s3-multiple

Run S3 tests multiple times, e.g. for 10 iterations use: --s3-multiple=10

--s3-device-check

Check differences between device configurations over a S3 cycle. Note we add a default of 15 seconds to allow wifi to re-associate. Cannot be used with --s3-min-delay, --s3-max-delay and --s3-delay-delta.

--s3-quirks

Comma separated list of quirk arguments to pass to pm-suspend, e.g. --s3-quirks=--quirk-radeon-off,--quirk-s3-bios

--s3-sleep-delay

Sleep N seconds between start of suspend and wakeup, e.g. --s3-sleep-delay=60. Note that this time needs to include the time taken to suspend the machine. If it is too short then the wakealarm will fire before the machine is fully suspended and hence the machine will not automatically wake up.

--s3-min-delay

Minimum time to wait (in integer seconds) before starting next S3 cycle.

--s3-max-delay

Maximum time to wait (in integer seconds) before starting next S3 cycle.

--s3-delay-delta

Delta in (seconds) to add to each delay between S3 cycles. When the delay reaches --s3-max-delay then it wraps back around to --s3-min-delay seconds.

Example:

sudo fwts s3 - 

..runs one suspend/resume cycle.

sudo fwts s3 --s3-multiple=50

..run 50 suspend/resume cycles.

sudo fwts s3 --s3-multiple=100 --s3-min-delay=1 --s3-max-delay=10 --s3-delay-delta=0.25 --s3-sleep-delay=25

..run 100 suspend/resume cycles, with a range of 1 to 10 seconds between each new suspend test and trigger the wake up alarm 25 seconds from when each suspend is initiated. Each iteration adds 0.25 seconds to the delay between each new suspend test.

Explanation of test results

Certain test results may require a little more explanation. This section will try and give some context to specific test failures.

Error ID

Explanation

BadWakeAlarmS3

Wakealarm does not seem to work.

DevConfigDiffAfterS3

When using the --s3-device-check option. Detected a device configuration change between suspend and resume which may indicate a driver suspend/resume fault.

ShortSuspend

Time in suspended state was shorter than expected, perhaps because the machine popped out of suspend back into resume immediately because of a BIOS bug.

LongSuspend

Time in suspended state was longer than expected, perhaps because the ACPI wake alarm failed to trigger a resume.

PMActionFailedPreS3

pm-suspend failed to suspend the machine and returned error 128.

PMActionPowerStateS3

pm-suspend failed to put the machine into the S3 (suspend) state and returned error 129.

PMActionFailedS3

pm-suspend failed to suspend the machine and returned error 130.

KlogCheck`S3

Failed to scan the kernel log.