summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@linux.intel.com>2017-08-29 18:35:38 +0300
committerLyude <lyude@redhat.com>2017-08-30 14:42:03 -0400
commit0be6d4a6601b1d8a02d607d5a95f6164c2e66067 (patch)
tree7862b59d827c6ede2a68a3b2f4ead0ebcd0cd93d /tests
parent2af28e0d34e2d5b3e85070944b4e4e792ec2fed2 (diff)
tests/audio: Add suspend and hibernate tests for HDMI signal integrity
This introduces tests for HDMI signal integrity after suspend and hibernate. They simply test that signal integrity is ensured before and after suspend or hibernate. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/audio.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/audio.c b/tests/audio.c
index 7fb91c97..560876a3 100644
--- a/tests/audio.c
+++ b/tests/audio.c
@@ -167,8 +167,27 @@ static void test_integrity(const char *device_name)
free(data.alsa);
}
+static void test_suspend_resume_integrity(const char *device_name,
+ enum igt_suspend_state state,
+ enum igt_suspend_test test)
+{
+ test_integrity(device_name);
+
+ igt_system_suspend_autoresume(state, test);
+
+ test_integrity(device_name);
+}
+
igt_main
{
igt_subtest("hdmi-integrity")
test_integrity("HDMI");
+
+ igt_subtest("hdmi-integrity-after-suspend")
+ test_suspend_resume_integrity("HDMI", SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+
+ igt_subtest("hdmi-integrity-after-hibernate")
+ test_suspend_resume_integrity("HDMI", SUSPEND_STATE_DISK,
+ SUSPEND_TEST_DEVICES);
}