diff mbox series

[i-g-t] igt/pm_rpm: Test incomplete(debug) suspends vs rpm

Message ID 20180807074358.4439-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [i-g-t] igt/pm_rpm: Test incomplete(debug) suspends vs rpm | expand

Commit Message

Chris Wilson Aug. 7, 2018, 7:43 a.m. UTC
Check that we restore runtime pm around debug suspends and hibernates.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/pm_rpm.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 4268bb19a..9bf718d63 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -1372,10 +1372,10 @@  static void __attribute__((noreturn)) stay_subtest(void)
 		sleep(600);
 }
 
-static void system_suspend_subtest(void)
+static void system_suspend_subtest(int state, int debug)
 {
 	disable_all_screens_and_wait(&ms_data);
-	igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
+	igt_system_suspend_autoresume(state, debug);
 	igt_assert(wait_for_suspended());
 }
 
@@ -1992,12 +1992,19 @@  int main(int argc, char *argv[])
 				WAIT_STATUS | WAIT_EXTRA);
 
 	/* System suspend */
+	igt_subtest("system-suspend-devices")
+		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES);
 	igt_subtest("system-suspend")
-		system_suspend_subtest();
+		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
 	igt_subtest("system-suspend-execbuf")
 		system_suspend_execbuf_subtest();
 	igt_subtest("system-suspend-modeset")
 		system_suspend_modeset_subtest();
+	igt_subtest("system-hibernate-devices")
+		system_suspend_subtest(SUSPEND_STATE_DISK,
+				       SUSPEND_TEST_DEVICES);
+	igt_subtest("system-hibernate")
+		system_suspend_subtest(SUSPEND_STATE_DISK, SUSPEND_TEST_NONE);
 
 	/* GEM stress */
 	igt_subtest("gem-execbuf-stress")