From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, jonathan.cavitt@intel.com
Subject: [igt-dev] [PATCH i-g-t] tests/intel: Do not error on -ECANCELED in xe_vm tests
Date: Thu, 16 Nov 2023 15:43:12 -0800 [thread overview]
Message-ID: <20231116234312.3045053-1-jonathan.cavitt@intel.com> (raw)
In the hammer class of unbind tests in xe_vm, a thread is created that
submits jobs to an exec queue initialized on a VM page that is later
unbound. Because of the unbind, a job is timing out and marking the
exec queue as "banned", which causes all subsequent job submissions to
report as -ECANCELED (-125).
This is expected behavior. The test should not fail when this is the
case, so use __xe_exec instead of the error-sensitive xe_exec in
hammer_thread, ignoring -ECANCELED and catching all other errors
manually.
Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
tests/intel/xe_vm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
index f1ccd6c21d..d16bb45892 100644
--- a/tests/intel/xe_vm.c
+++ b/tests/intel/xe_vm.c
@@ -1118,6 +1118,7 @@ static void *hammer_thread(void *tdata)
uint32_t exec_queue = xe_exec_queue_create(t->fd, t->vm, t->eci, 0);
int b;
int i = 0;
+ int err = 0;
sync[0].handle = syncobj_create(t->fd, 0);
pthread_barrier_wait(t->barrier);
@@ -1140,14 +1141,15 @@ static void *hammer_thread(void *tdata)
exec.address = batch_addr;
if (i % 32) {
exec.num_syncs = 0;
- xe_exec(t->fd, &exec);
+ err = __xe_exec(t->fd, &exec);
} else {
exec.num_syncs = 1;
- xe_exec(t->fd, &exec);
+ err = __xe_exec(t->fd, &exec);
igt_assert(syncobj_wait(t->fd, &sync[0].handle, 1,
INT64_MAX, 0, NULL));
syncobj_reset(t->fd, &sync[0].handle, 1);
}
+ igt_assert(!err || err == -ECANCELED);
++i;
}
--
2.25.1
next reply other threads:[~2023-11-16 23:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 23:43 Jonathan Cavitt [this message]
2023-11-17 0:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/intel: Do not error on -ECANCELED in xe_vm tests Patchwork
2023-11-17 16:23 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/intel: Do not error on -ECANCELED in xe_vm tests (rev2) Patchwork
2023-11-17 17:15 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-18 11:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-11-23 8:46 ` [igt-dev] [PATCH i-g-t] tests/intel: Do not error on -ECANCELED in xe_vm tests 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=20231116234312.3045053-1-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=saurabhg.gupta@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