mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-19 05:46:25 +00:00
lib: Skip suspend/hibernate tests if the system doesn't support them
Do a dry run with rtcwake first to determine if the system even supports the intended suspend state. If not, skip the test. Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
parent
47db6fbd99
commit
8a17af80e0
@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
|
|||||||
* seems to fare better. We need to investigate what's going on. */
|
* seems to fare better. We need to investigate what's going on. */
|
||||||
igt_skip_on_simulation();
|
igt_skip_on_simulation();
|
||||||
|
|
||||||
|
/* skip if system doesn't support suspend-to-mem */
|
||||||
|
igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
|
||||||
|
|
||||||
ret = system("rtcwake -s 30 -m mem");
|
ret = system("rtcwake -s 30 -m mem");
|
||||||
igt_assert_f(ret == 0,
|
igt_assert_f(ret == 0,
|
||||||
"This failure means that something is wrong with the "
|
"This failure means that something is wrong with the "
|
||||||
@ -384,6 +387,9 @@ void igt_system_hibernate_autoresume(void)
|
|||||||
* seems to fare better. We need to investigate what's going on. */
|
* seems to fare better. We need to investigate what's going on. */
|
||||||
igt_skip_on_simulation();
|
igt_skip_on_simulation();
|
||||||
|
|
||||||
|
/* skip if system doesn't support suspend-to-disk */
|
||||||
|
igt_skip_on(system("rtcwake -n -s 90 -m disk") != 0);
|
||||||
|
|
||||||
/* The timeout might need to be adjusted if hibernation takes too long
|
/* The timeout might need to be adjusted if hibernation takes too long
|
||||||
* or if we have to wait excessively long before resume
|
* or if we have to wait excessively long before resume
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user