From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: igt-dev@lists.freedesktop.org, shekhar.chauhan@intel.com
Cc: harish.chegondi@intel.com
Subject: [PATCH v2 3/8] tests/intel/xe_oa: Check that a removed device can't open OA streams
Date: Tue, 3 Nov 2026 16:55:09 -0800 [thread overview]
Message-ID: <20261104005505.3232485-13-umesh.nerlige.ramappa@intel.com> (raw)
In-Reply-To: <20261104005505.3232485-10-umesh.nerlige.ramappa@intel.com>
An OA ioctl that races with unbind must not reach OA once it is torn
down. Check that STREAM_OPEN on the drm fd of the removed device fails
with ENODEV.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
tests/intel/xe_oa.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index 046d57c3f4e8..e10b77bca1b2 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -2937,7 +2937,8 @@ static void unbind_rebind_recover(void)
/**
* SUBTEST: unbind-rebind-stream
* Description: Open an OA stream and test the effects of unbind and rebind: the stream
- * dies and the device works after rebind.
+ * dies, no new streams can be opened on the removed device and the device
+ * works after rebind.
*/
static void test_unbind_rebind(const struct drm_xe_oa_unit *oau0, unsigned int flags)
{
@@ -2966,6 +2967,10 @@ static void test_unbind_rebind(const struct drm_xe_oa_unit *oau0, unsigned int f
for (i = 0; i < unbind_num_streams; i++)
unbind_stream_check_dead(&streams[i], "after-unbind");
+ /* The drm fd of the removed device can't open new streams */
+ intel_xe_perf_ioctl_err(drm_fd, DRM_XE_OBSERVATION_OP_STREAM_OPEN, &primary->param,
+ ENODEV);
+
if (flags & UNBIND_CLOSE_BEFORE_REBIND) {
igt_set_timeout(60, "stream close timed out (wedged?)");
for (i = 0; i < unbind_num_streams; i++)
--
2.55.0
next prev parent reply other threads:[~2026-11-04 1:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 0:55 [PATCH v2 0/8] Test unbinding PCI device while OA stream is open Umesh Nerlige Ramappa
2026-11-04 0:55 ` [PATCH v2 1/8] tests/intel/xe_oa: Move device setup and teardown into helpers Umesh Nerlige Ramappa
2026-11-04 0:55 ` [PATCH v2 2/8] tests/intel/xe_oa: Add unbind/rebind test with an open OA stream Umesh Nerlige Ramappa
2026-11-26 7:09 ` Shekhar Chauhan
2026-11-04 0:55 ` Umesh Nerlige Ramappa [this message]
2026-11-26 7:10 ` [PATCH v2 3/8] tests/intel/xe_oa: Check that a removed device can't open OA streams Shekhar Chauhan
2026-11-04 0:55 ` [PATCH v2 4/8] tests/intel/xe_oa: Check OA buffer mmaps across unbind Umesh Nerlige Ramappa
2026-11-26 7:10 ` Shekhar Chauhan
2026-11-04 0:55 ` [PATCH v2 5/8] tests/intel/xe_oa: Check vm_ops->access on " Umesh Nerlige Ramappa
2026-11-26 5:55 ` Shekhar Chauhan
2026-11-04 0:55 ` [PATCH v2 6/8] tests/intel/xe_oa: Check that blocked OA stream waiters are woken up on unbind Umesh Nerlige Ramappa
2026-11-26 6:42 ` Shekhar Chauhan
2026-11-04 0:55 ` [PATCH v2 7/8] tests/intel/xe_oa: Add an exec queue variant to the unbind/rebind test Umesh Nerlige Ramappa
2026-11-26 7:11 ` Shekhar Chauhan
2026-11-04 0:55 ` [PATCH v2 8/8] tests/intel/xe_oa: Add an all OA units " Umesh Nerlige Ramappa
2026-11-26 7:06 ` Shekhar Chauhan
2026-11-04 2:19 ` ✓ Xe.CI.BAT: success for Test unbinding PCI device while OA stream is open (rev2) Patchwork
2026-11-04 2:39 ` ✗ i915.CI.BAT: failure " Patchwork
2026-11-04 17:42 ` ✗ Xe.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=20261104005505.3232485-13-umesh.nerlige.ramappa@intel.com \
--to=umesh.nerlige.ramappa@intel.com \
--cc=harish.chegondi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=shekhar.chauhan@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