From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jonathan.cavitt@intel.com, saurabhg.gupta@intel.com,
brian.welty@intel.com, tomasz.mistat@intel.com,
himanshu.girotra@intel.com, kamil.konieczny@linux.intel.com
Subject: [PATCH i-g-t v2 2/2] tests/intel/xe_exec_fault_mode: account for EBUSY in support check
Date: Fri, 10 May 2024 11:24:38 -0700 [thread overview]
Message-ID: <20240510182438.3178575-3-jonathan.cavitt@intel.com> (raw)
In-Reply-To: <20240510182438.3178575-1-jonathan.cavitt@intel.com>
It's possible for xe_supports_faults to return false if the system is
busy with multiple running tests. This is because the check looks for
all active VMs and searches for VMs that do not have faults enabled,
returning false if any exist. Recently, this check has been changed to
return EBUSY when the check fails in this way, so wait for up to two
seconds for all the active VMs to flush out before proceeding.
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
tests/intel/xe_exec_fault_mode.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_exec_fault_mode.c b/tests/intel/xe_exec_fault_mode.c
index 0b3f4cb8de..4f55756e92 100644
--- a/tests/intel/xe_exec_fault_mode.c
+++ b/tests/intel/xe_exec_fault_mode.c
@@ -406,8 +406,18 @@ igt_main
int fd;
igt_fixture {
+ struct timespec tv = {};
+ bool supports_faults;
+ int ret;
+ int timeout = igt_run_in_simulation() ? 20 : 2;
+
fd = drm_open_driver(DRIVER_XE);
- igt_require(xe_supports_faults(fd));
+ do {
+ ret = xe_supports_faults(fd);
+ } while (ret == -EBUSY && igt_seconds_elapsed(&tv) < timeout);
+
+ supports_faults = !ret;
+ igt_require(supports_faults);
}
for (const struct section *s = sections; s->name; s++) {
--
2.25.1
next prev parent reply other threads:[~2024-05-10 18:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 18:24 [PATCH i-g-t v2 0/2] lib/xe/xe_query: Wait for xe_supports_faults Jonathan Cavitt
2024-05-10 18:24 ` [PATCH i-g-t v2 1/2] lib/xe/xe_query: return errno from xe_supports_faults check Jonathan Cavitt
2024-05-13 13:12 ` Kamil Konieczny
2024-05-10 18:24 ` Jonathan Cavitt [this message]
2024-05-13 13:19 ` [PATCH i-g-t v2 2/2] tests/intel/xe_exec_fault_mode: account for EBUSY in support check Kamil Konieczny
2024-05-10 20:10 ` ✓ CI.xeBAT: success for lib/xe/xe_query: Wait for xe_supports_faults Patchwork
2024-05-10 20:18 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-10 22:31 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-12 6:58 ` ✗ Fi.CI.IGT: " Patchwork
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=20240510182438.3178575-3-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=brian.welty@intel.com \
--cc=himanshu.girotra@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=saurabhg.gupta@intel.com \
--cc=tomasz.mistat@intel.com \
/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