From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Subject: [PATCH i-g-t] tests/intel/xe_oa: Extend enable-disable to read after disabling stream
Date: Tue, 17 Mar 2026 15:39:10 -0700 [thread overview]
Message-ID: <20260317223910.3539034-1-ashutosh.dixit@intel.com> (raw)
Extend enable-disable subtest to validate the new feature of reading after
disabling OA stream.
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
tests/intel/xe_oa.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index 387f29535e..6a602a014c 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -2774,6 +2774,31 @@ test_enable_disable(const struct drm_xe_oa_unit *oau)
get_stream_status(stream_fd);
igt_assert_eq(ret, sizeof(buf));
+ /*
+ * Wait again for number of reports specified in
+ * DRM_XE_OA_PROPERTY_WAIT_NUM_REPORTS
+ */
+ pollfd.fd = stream_fd;
+ pollfd.events = POLLIN;
+ poll(&pollfd, 1, -1);
+ igt_assert(pollfd.revents & POLLIN);
+
+ do_ioctl(stream_fd, DRM_XE_OBSERVATION_IOCTL_DISABLE, 0);
+
+ /* Ensure num_reports can be read even with disabled stream */
+ while ((ret = read(stream_fd, buf, sizeof(buf))) < 0 && errno == EINTR)
+ ;
+ get_stream_status(stream_fd);
+ igt_assert_eq(ret, sizeof(buf));
+
+ /* In non-blocking mode read till we see a -EAGAIN, signifying all available data is read */
+ set_fd_flags(stream_fd, O_CLOEXEC | O_NONBLOCK);
+ while ((ret = read(stream_fd, buf, sizeof(buf))) > 0 ||
+ (ret == -1 && (errno == EINTR || errno == EIO)))
+ ;
+ igt_assert_eq(ret, -1);
+ igt_assert_eq(errno, EAGAIN);
+
__perf_close(stream_fd);
}
--
2.48.1
next reply other threads:[~2026-03-17 22:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 22:39 Ashutosh Dixit [this message]
2026-03-18 3:03 ` ✓ Xe.CI.BAT: success for tests/intel/xe_oa: Extend enable-disable to read after disabling stream Patchwork
2026-03-18 3:15 ` ✓ i915.CI.BAT: " Patchwork
2026-03-19 7:25 ` ✓ i915.CI.Full: " Patchwork
2026-03-19 16:07 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-28 1:15 ` ✓ Xe.CI.BAT: success for tests/intel/xe_oa: Extend enable-disable to read after disabling stream (rev2) Patchwork
2026-03-28 1:46 ` ✓ i915.CI.BAT: " Patchwork
2026-03-28 20:08 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-29 7:53 ` ✓ i915.CI.Full: success " Patchwork
2026-03-30 17:58 ` [PATCH i-g-t] tests/intel/xe_oa: Extend enable-disable to read after disabling stream Umesh Nerlige Ramappa
2026-03-30 20:14 ` Dixit, Ashutosh
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=20260317223910.3539034-1-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=umesh.nerlige.ramappa@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