[PATCH i-g-t v6] tests/intel/xe_exec_fault_mode: Don't return early
Nirmoy Das
nirmoy.das at intel.com
Wed Sep 4 13:49:16 UTC 2024
Tests that are causing pagefaults should wait for exec queue to
ban/finish otherwise pending engine resets because of on-going
pagefaults would cause failure in subsequent tests to fail.
Not all execs will generate page faults and in such case reading ban
property is not enough but the signal should either -EIO or 0.
so read that instead.
v2: specify timeout reason and iterate over exec_queues(Andrzej)
v3: increase timeout
v4: check for signal status to be -EIO/0.
v5: code rearrangement and other minor fixes(Andrzej)
v6: commit message fix(Tejas)
Cc: Andrzej Hajda <andrzej.hajda at intel.com>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Cc: Matthew Brost <matthew.brost at intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay at intel.com>
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1630
Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda at intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
---
tests/intel/xe_exec_fault_mode.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/tests/intel/xe_exec_fault_mode.c b/tests/intel/xe_exec_fault_mode.c
index 1f1f1e50b..9cc51b7d3 100644
--- a/tests/intel/xe_exec_fault_mode.c
+++ b/tests/intel/xe_exec_fault_mode.c
@@ -324,9 +324,19 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
bind_exec_queues[0], NSEC_PER_SEC);
- if (!(flags & INVALID_FAULT) && !(flags & INVALID_VA)) {
+ if (flags & INVALID_FAULT) {
+ for (i = 0; i < n_execs; i++) {
+ int ret;
+ int64_t timeout = NSEC_PER_SEC;
+
+ ret = __xe_wait_ufence(fd, &data[i].exec_sync, USER_FENCE_VALUE,
+ exec_queues[i % n_exec_queues], &timeout);
+ igt_assert(ret == -EIO || ret == 0);
+ }
+ } else if (!(flags & INVALID_VA)) {
for (i = j; i < n_execs; i++)
- igt_assert_eq(data[i].data, 0xc0ffee);
+ igt_assert_eq(data[i].data, 0xc0ffee);
+
}
for (i = 0; i < n_exec_queues; i++) {
--
2.42.0
More information about the igt-dev
mailing list