summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt_aux.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 04ca25b0..f3c76aeb 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
* seems to fare better. We need to investigate what's going on. */
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");
igt_assert_f(ret == 0,
"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. */
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
* or if we have to wait excessively long before resume
*/