Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Sokolowski <jan.sokolowski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Jan Sokolowski <jan.sokolowski@intel.com>
Subject: [PATCH i-g-t v1 1/1] tests/xe_eudebug: check if driver is open before toggling enable
Date: Fri, 10 Jan 2025 12:52:01 +0000	[thread overview]
Message-ID: <20250110125201.59630-1-jan.sokolowski@intel.com> (raw)

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


             reply	other threads:[~2025-01-10 12:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10 12:52 Jan Sokolowski [this message]
2025-01-10 13:39 ` ✗ GitLab.Pipeline: warning for series starting with [i-g-t,v1,1/1] tests/xe_eudebug: check if driver is open before toggling enable 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250110125201.59630-1-jan.sokolowski@intel.com \
    --to=jan.sokolowski@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox