From: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
To: Stuart Summers <stuart.summers@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 2/3] tests/intel/xe_exec_reset: Add checks for hanging queue wait_ufence return
Date: Sun, 12 Apr 2026 19:30:14 -0700 [thread overview]
Message-ID: <adxVNkrvqsNIrhvg@nvishwa1-desk> (raw)
In-Reply-To: <20260409203702.4350-3-stuart.summers@intel.com>
On Thu, Apr 09, 2026 at 08:37:00PM +0000, Stuart Summers wrote:
>There is a 3 second wait user fence timeout for the compute mode
>variants of this test. Instead of just skipping the wait altogether,
>let's make sure this does in fact return -ETIME as expected there.
>
>Also add the i == 0 cases for legacy and compute path for the actual
>data checks to stay consistent and to be a little more explicit
>about what we're checking there.
>
>This also let's us add a little more detail to the cases in some
>planned changes around hanging multi queue secondary queues.
>
>Signed-off-by: Stuart Summers <stuart.summers@intel.com>
>---
> lib/xe/xe_legacy.c | 8 ++++++--
> tests/intel/xe_exec_reset.c | 15 +++++++++++----
> 2 files changed, 17 insertions(+), 6 deletions(-)
>
>diff --git a/lib/xe/xe_legacy.c b/lib/xe/xe_legacy.c
>index 6aeddc578..3371a91ac 100644
>--- a/lib/xe/xe_legacy.c
>+++ b/lib/xe/xe_legacy.c
>@@ -230,9 +230,13 @@ xe_legacy_test_mode(int fd, struct drm_xe_engine_class_instance *eci,
> igt_assert(syncobj_wait(fd, &sync[0].handle, 1, INT64_MAX, 0, NULL));
>
> if (!use_capture_mode && !(flags & (GT_RESET | CANCEL | COMPRESSION))) {
>- for (i = flags & LONG_SPIN ? n_exec_queues : 1;
>- i < n_execs + extra_execs; i++)
>+ for (i = flags & LONG_SPIN ? n_exec_queues : 0;
>+ i < n_execs + extra_execs; i++) {
>+ if (!i)
>+ continue;
>+
> igt_assert_eq(data[i].data, 0xc0ffee);
>+ }
> }
>
> syncobj_destroy(fd, sync[0].handle);
>diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
>index 95191139d..6b71d9144 100644
>--- a/tests/intel/xe_exec_reset.c
>+++ b/tests/intel/xe_exec_reset.c
>@@ -461,17 +461,20 @@ test_compute_mode(int fd, struct drm_xe_engine_class_instance *eci,
> return;
> }
>
>- for (i = 1; i < n_execs; i++) {
>+ for (i = 0; i < n_execs; i++) {
> int64_t timeout = 3 * NSEC_PER_SEC;
> int err;
>
> err = __xe_wait_ufence(fd, &data[i].exec_sync, USER_FENCE_VALUE,
> exec_queues[i % n_exec_queues], &timeout);
>- if (flags & GT_RESET || flags & CAT_ERROR)
>+ if (!i) {
>+ igt_assert(err == -ETIME || err == -EIO);
>+ } else if (flags & GT_RESET || flags & CAT_ERROR) {
> /* exec races with reset: may return -EIO or complete */
> igt_assert(err == -EIO || !err);
>- else
>+ } else {
> igt_assert_eq(err, 0);
>+ }
> }
>
> sync[0].addr = to_user_pointer(&data[0].vm_sync);
>@@ -479,8 +482,12 @@ test_compute_mode(int fd, struct drm_xe_engine_class_instance *eci,
> xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE, 0, 3 * NSEC_PER_SEC);
>
> if (!(flags & (GT_RESET | CANCEL))) {
>- for (i = 1; i < n_execs; i++)
>+ for (i = 0; i < n_execs; i++) {
>+ if (!i)
>+ continue;
>+
> igt_assert_eq(data[i].data, 0xc0ffee);
>+ }
> }
>
> for (i = 0; i < n_exec_queues; i++)
LGTM
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
>--
>2.43.0
>
next prev parent reply other threads:[~2026-04-13 2:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 20:36 [PATCH i-g-t 0/3] Add test coverage for multi queue reset Stuart Summers
2026-04-09 20:36 ` [PATCH i-g-t 1/3] tests/intel/xe_exec_reset: Add a comment about return for syncobj wait Stuart Summers
2026-04-13 2:29 ` Niranjana Vishwanathapura
2026-04-09 20:37 ` [PATCH i-g-t 2/3] tests/intel/xe_exec_reset: Add checks for hanging queue wait_ufence return Stuart Summers
2026-04-13 2:30 ` Niranjana Vishwanathapura [this message]
2026-04-09 20:37 ` [PATCH i-g-t 3/3] tests/intel/xe_exec_reset: Add multi queue subtests Stuart Summers
2026-04-13 2:32 ` Niranjana Vishwanathapura
2026-04-13 21:00 ` Summers, Stuart
2026-04-13 2:34 ` Niranjana Vishwanathapura
2026-04-13 21:01 ` Summers, Stuart
2026-04-13 21:17 ` Summers, Stuart
2026-04-10 4:15 ` ✓ Xe.CI.BAT: success for Add test coverage for multi queue reset Patchwork
2026-04-10 4:29 ` ✓ i915.CI.BAT: " Patchwork
2026-04-10 9:54 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-13 21:02 ` Summers, Stuart
2026-04-11 0:11 ` ✗ i915.CI.Full: " 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=adxVNkrvqsNIrhvg@nvishwa1-desk \
--to=niranjana.vishwanathapura@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=stuart.summers@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