From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/intel/xe_oa: Get stream status on read error
Date: Thu, 10 Apr 2025 13:33:44 -0700 [thread overview]
Message-ID: <877c3reoyf.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20250409233441.143402-1-umesh.nerlige.ramappa@intel.com>
On Wed, 09 Apr 2025 16:34:41 -0700, Umesh Nerlige Ramappa wrote:
>
> Whenever read fails, get stream status so we know the state of OA status
> bits.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
> tests/intel/xe_oa.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 67acc74b3279..f3521c3d602e 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -2294,6 +2294,7 @@ static void test_polling_small_buf(void)
> errno = 0;
> ret = read(stream_fd, buf, sizeof(buf));
> igt_assert_eq(ret, -1);
> + get_stream_status(stream_fd);
> igt_assert_eq(errno, ENOSPC);
>
> /* Poll with 0 timeout and expect POLLIN flag to be set */
> @@ -2568,6 +2569,7 @@ test_enable_disable(const struct drm_xe_engine_class_instance *hwe)
> errno = 0;
> ret = read(stream_fd, buf, sizeof(buf));
> igt_assert_eq(ret, -1);
> + get_stream_status(stream_fd);
> igt_assert_eq(errno, EINVAL);
>
> do_ioctl(stream_fd, DRM_XE_OBSERVATION_IOCTL_ENABLE, 0);
> @@ -2584,6 +2586,7 @@ test_enable_disable(const struct drm_xe_engine_class_instance *hwe)
> /* Ensure num_reports can be read */
> while ((ret = read(stream_fd, buf, sizeof(buf))) < 0 && errno == EINTR)
> ;
> + get_stream_status(stream_fd);
> igt_assert_eq(ret, sizeof(buf));
Here read() is not failing, so maybe we should drop this one? Otherwise:
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
>
> __perf_close(stream_fd);
> @@ -2727,6 +2730,7 @@ test_non_sampling_read_error(void)
>
> ret = read(stream_fd, buf, sizeof(buf));
> igt_assert_eq(ret, -1);
> + get_stream_status(stream_fd);
> igt_assert_eq(errno, EINVAL);
>
> __perf_close(stream_fd);
> @@ -2768,6 +2772,7 @@ test_disabled_read_error(void)
>
> ret = read(stream_fd, buf, sizeof(buf));
> igt_assert_eq(ret, -1);
> + get_stream_status(stream_fd);
> igt_assert_eq(errno, EINVAL);
>
> __perf_close(stream_fd);
> @@ -2786,6 +2791,7 @@ test_disabled_read_error(void)
>
> ret = read(stream_fd, buf, sizeof(buf));
> igt_assert_eq(ret, -1);
> + get_stream_status(stream_fd);
> igt_assert_eq(errno, EINVAL);
>
> do_ioctl(stream_fd, DRM_XE_OBSERVATION_IOCTL_ENABLE, 0);
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-04-10 20:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 23:34 [PATCH i-g-t] tests/intel/xe_oa: Get stream status on read error Umesh Nerlige Ramappa
2025-04-10 2:35 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-04-10 3:27 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-10 8:34 ` ✗ i915.CI.BAT: " Patchwork
2025-04-10 20:33 ` Dixit, Ashutosh [this message]
2025-04-14 22:19 ` [PATCH i-g-t] " Umesh Nerlige Ramappa
2025-04-14 23:19 ` Dixit, Ashutosh
2025-04-14 23:26 ` Umesh Nerlige Ramappa
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=877c3reoyf.wl-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.