Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v1 1/1] tests/xe_eudebug: check if driver is open before toggling enable
@ 2025-01-10 12:52 Jan Sokolowski
  2025-01-10 13:39 ` ✗ GitLab.Pipeline: warning for series starting with [i-g-t,v1,1/1] " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Jan Sokolowski @ 2025-01-10 12:52 UTC (permalink / raw)
  To: igt-dev; +Cc: Jan Sokolowski

In some cases, ccs_mode_all_engines can fail,
which will cause test fixture to not execute properly
and skip drm_open_driver, thus putting the test
in an unstable state.

Check if driver is open or not and reopen if necessary.

Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
---
 tests/intel/xe_eudebug.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/intel/xe_eudebug.c b/tests/intel/xe_eudebug.c
index 22b0da658..6d06ed647 100644
--- a/tests/intel/xe_eudebug.c
+++ b/tests/intel/xe_eudebug.c
@@ -2868,7 +2868,16 @@ igt_main
 	}
 
 	igt_fixture {
+		/* in previous subtest group, ccs_mode_all_engines can fail,
+		 * which will cause test fixture to not execute properly
+		 * and skip drm_open_driver, thus putting the test in an unstable state.
+		 * Therefore, check if driver is open or not and reopen if necessary
+		 */
+		if (fcntl(fd, F_GETFD) < 0)
+			fd = drm_open_driver(DRIVER_XE);
+
 		xe_eudebug_enable(fd, was_enabled);
+
 		drm_close_driver(fd);
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-01-15 10:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10 12:52 [PATCH i-g-t v1 1/1] tests/xe_eudebug: check if driver is open before toggling enable Jan Sokolowski
2025-01-10 13:39 ` ✗ GitLab.Pipeline: warning for series starting with [i-g-t,v1,1/1] " Patchwork
2025-01-10 14:05 ` ✓ Xe.CI.BAT: success " Patchwork
2025-01-10 14:20 ` ✓ i915.CI.BAT: " Patchwork
2025-01-13  6:34 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-14  9:49   ` Sokolowski, Jan
2025-01-14 16:56 ` ✗ i915.CI.Full: " Patchwork
2025-01-15 10:39 ` [PATCH i-g-t v1 1/1] " Kamil Konieczny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox