suspend_resume¶
Source code: suspend_resume.py
Suspend and resume device with given cycles.
Description¶
Suspends and resumes the device an adjustable number of times for adjustable random lengths of time.
Test Procedure¶
This is an automated test without user interaction.
When started, the test will try to suspend and resume by given arguments. Will fail if device wakes too early, or if unexpected reboot (or crash) found.
Dependency¶
rtc’s
wakealarm
entry insysfs
.check_powerd_config
if the argumentsuspend_type
is not set.
Note that the rtc sysfs entry may vary from device to device, so the test_list
must define the path to the correct sysfs entry for the specific device, the
default assumes a typical /sys/class/rtc/rtc0
entry.
Examples¶
To suspend/resume in 1 cycle, suspend in 5~10 seconds, resume in 5~10 seconds, and suspend to memory (see more criteria from arguments):
{
"pytest_name": "suspend_resume"
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
cycles |
int |
(optional; default: |
suspend_delay_max_secs |
int |
(optional; default: |
suspend_delay_min_secs |
int |
(optional; default: |
resume_delay_max_secs |
int |
(optional; default: |
resume_delay_min_secs |
int |
(optional; default: |
suspend_time_margin_min_secs |
int |
(optional; default: |
suspend_time_margin_max_secs |
int |
(optional; default: |
suspend_worst_case_secs |
int |
(optional; default: |
wakealarm_path |
str |
(optional; default: |
time_path |
str |
(optional; default: |
wakeup_count_path |
str |
(optional; default: |
suspend_type |
str, None |
(optional; default: |
ignore_wakeup_source |
str, None |
(optional; default: |
early_resume_retry_wait_secs |
int |
(optional; default: |
ensure_wakealarm_cleared |
bool |
(optional; default: |