[i-g-t] tests/intel/i915_suspend: Fix WARN of invalid fd

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Jan 9 10:27:03 UTC 2024


Move "basic-s2idle-without-i915" & "basic-s3-without-i915" to
end of the file to avoid WARNs:

(i915_suspend:7563) drmtest-WARNING: Don't attempt to close standard/invalid file descriptor: -1

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/intel/i915_suspend.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/intel/i915_suspend.c b/tests/intel/i915_suspend.c
index c25805584..bf5a170d3 100644
--- a/tests/intel/i915_suspend.c
+++ b/tests/intel/i915_suspend.c
@@ -320,14 +320,6 @@ int fd;
 
 igt_main
 {
-	igt_describe("Validate suspend-to-idle without i915 module");
-	igt_subtest("basic-s2idle-without-i915")
-		test_suspend_without_i915(SUSPEND_STATE_FREEZE);
-
-	igt_describe("Validate S3 without i915 module");
-	igt_subtest("basic-s3-without-i915")
-		test_suspend_without_i915(SUSPEND_STATE_S3);
-
 	igt_fixture {
 		/*
 		 * Since above subtests may fail, leaving i915 module unloaded
@@ -384,4 +376,12 @@ igt_main
 
 	igt_fixture
 		drm_close_driver(fd);
+
+	igt_describe("Validate suspend-to-idle without i915 module");
+	igt_subtest("basic-s2idle-without-i915")
+		test_suspend_without_i915(SUSPEND_STATE_FREEZE);
+
+	igt_describe("Validate S3 without i915 module");
+	igt_subtest("basic-s3-without-i915")
+		test_suspend_without_i915(SUSPEND_STATE_S3);
 }
-- 
2.40.0



More information about the igt-dev mailing list