[igt-dev] [PATCH i-g-t v4 1/2] tests/i915/i915_suspend: Add system-suspend-without-i915 subtest
Riana Tauro
riana.tauro at intel.com
Wed Mar 30 05:11:04 UTC 2022
From: "Tauro, Riana" <riana.tauro at intel.com>
Add a new subtest system-suspend-without-i915 to exercise suspend/resume cycle
without i915 module to know the system wide health of suspend/resume feature.
This test will be part of CI fast-feedback test list
v2: Remove drm_cancel_work_at_exit
- Add igt_describe (Anshuman)
v3: Added assertion on unload module (Anshuman)
v4: Addressed cosmetic review comments (Ashutosh)
Reviewed-by: Anshuman Gupta <anshuman.gupta at intel.com>
Signed-off-by: Tauro, Riana <riana.tauro at intel.com>
---
tests/i915/i915_suspend.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tests/i915/i915_suspend.c b/tests/i915/i915_suspend.c
index da27ce09..d34b7a5d 100644
--- a/tests/i915/i915_suspend.c
+++ b/tests/i915/i915_suspend.c
@@ -41,6 +41,7 @@
#include "i915/gem.h"
#include "i915/gem_create.h"
#include "igt.h"
+#include "igt_kmod.h"
#include "igt_device.h"
#define OBJECT_SIZE (16*1024*1024)
@@ -202,10 +203,26 @@ test_forcewake(int fd, bool hibernate)
close (fw_fd);
}
+static void
+test_suspend_without_i915(void)
+{
+ igt_kmsg(KMSG_INFO "Unloading i915\n");
+ igt_assert_eq(igt_i915_driver_unload(),0);
+
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
+
+ igt_kmsg(KMSG_INFO "Re-loading i915 \n");
+ igt_assert_eq(igt_i915_driver_load(NULL), 0);
+}
+
int fd;
igt_main
{
+ igt_describe("Validate system suspend cycle without i915 module");
+ igt_subtest("system-suspend-without-i915")
+ test_suspend_without_i915();
+
igt_fixture
fd = drm_open_driver(DRIVER_INTEL);
--
2.25.1
More information about the igt-dev
mailing list