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] tests/intel/xe_oa: Ignore other errors when looking for buffer overflow
Date: Wed, 21 May 2025 13:12:28 -0700 [thread overview]
Message-ID: <87o6vl4tar.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20250520195249.326080-2-umesh.nerlige.ramappa@intel.com>
On Tue, 20 May 2025 12:52:50 -0700, Umesh Nerlige Ramappa wrote:
>
> Occassionally other error bits will result in EIO and prematurely end
> the buffer-fill test. For this test, ignore other errors.
>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4565
From CI buglog it looks like, a REPORT_LOST (0x1) status is returned before
BUFFER_OVERFLOW (0x2) status?
Patch generally looks ok, but a question below.
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
> tests/intel/xe_oa.c | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 73841a359daf..2022c5cb3955 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -2520,7 +2520,6 @@ test_buffer_fill(const struct drm_xe_engine_class_instance *hwe)
> char *buf = malloc(1024);
> bool overflow_seen;
> u32 oa_status;
> - int len;
>
> igt_debug("oa_period %s\n", pretty_print_oa_period(oa_period));
> stream_fd = __perf_open(drm_fd, ¶m, true /* prevent_pm */);
> @@ -2535,16 +2534,22 @@ test_buffer_fill(const struct drm_xe_engine_class_instance *hwe)
>
> errno = 0;
> /* Read 0 bytes repeatedly until you see an EIO */
> - while ((len = read(stream_fd, buf, 0)) == -1 && (errno == EINTR || errno == ENOSPC)) {
> + while (-1 == read(stream_fd, buf, 0)) {
> + if (errno == EIO) {
> + oa_status = get_stream_status(stream_fd);
> + overflow_seen = oa_status & DRM_XE_OASTATUS_BUFFER_OVERFLOW;
> + if (overflow_seen)
> + break;
> + }
> usleep(100);
> }
> - igt_assert_eq(len, -1);
> - igt_assert_eq(errno, EIO);
> + igt_assert(overflow_seen);
>
> - /* Ensure buffer overflowed */
> + /* Make sure the buffer overflow is cleared */
> + read(stream_fd, buf, 0);
How does the buffer overflow status get cleared? We are still doing 0 size reads?
> oa_status = get_stream_status(stream_fd);
> overflow_seen = oa_status & DRM_XE_OASTATUS_BUFFER_OVERFLOW;
> - igt_assert(overflow_seen);
> + igt_assert_eq(overflow_seen, 0);
>
> __perf_close(stream_fd);
> }
> --
> 2.43.0
>
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2025-05-21 20:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 19:52 [PATCH] tests/intel/xe_oa: Ignore other errors when looking for buffer overflow Umesh Nerlige Ramappa
2025-05-20 21:34 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-05-20 21:49 ` ✓ i915.CI.BAT: " Patchwork
2025-05-21 1:06 ` ✗ i915.CI.Full: failure " Patchwork
2025-05-21 11:43 ` ✗ Xe.CI.Full: " Patchwork
2025-05-21 20:12 ` Dixit, Ashutosh [this message]
2025-05-21 20:25 ` [PATCH] " Umesh Nerlige Ramappa
2025-05-22 6:37 ` 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=87o6vl4tar.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.