[PATCH igt-dii-client v3 2/2] tests/intel/xe_exec_fault_mode: account for EBUSY in support check
Jonathan Cavitt
jonathan.cavitt at intel.com
Tue May 14 14:41:22 UTC 2024
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 at intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
tests/intel/xe_exec_fault_mode.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_exec_fault_mode.c b/tests/intel/xe_exec_fault_mode.c
index 0b3f4cb8de..ecea4d53ee 100644
--- a/tests/intel/xe_exec_fault_mode.c
+++ b/tests/intel/xe_exec_fault_mode.c
@@ -406,8 +406,20 @@ igt_main
int fd;
igt_fixture {
+ struct timespec tv = {};
+ bool supports_faults;
+ int ret = 0;
+ int timeout = igt_run_in_simulation() ? 20 : 2;
+
fd = drm_open_driver(DRIVER_XE);
- igt_require(xe_supports_faults(fd));
+ do {
+ if (ret)
+ usleep(5000);
+ 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
More information about the igt-dev
mailing list