All of lore.kernel.org
 help / color / mirror / Atom feed
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: Save and restore errno in get_stream_status
Date: Thu, 17 Apr 2025 16:00:51 -0700	[thread overview]
Message-ID: <85zfgeqtp8.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20250417223931.5504-1-umesh.nerlige.ramappa@intel.com>

On Thu, 17 Apr 2025 15:39:31 -0700, Umesh Nerlige Ramappa wrote:
>
> Turns out that get_stream_status resets errno and anything that checks
> errno afterwards fails. This resulted in a bunch of test failures. Fix
> it by saving and restoring errno within get_stream_status.
>
> v2: Go back to calling get_stream_status unconditionally (Ashutosh)

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4804
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
>  tests/intel/xe_oa.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 1fc8bfaafee2..a219f80fdcf3 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -380,9 +380,11 @@ static void set_fd_flags(int fd, int flags)
>  static u32 get_stream_status(int fd)
>  {
>	struct drm_xe_oa_stream_status status;
> +	int _e = errno;
>
>	do_ioctl(fd, DRM_XE_OBSERVATION_IOCTL_STATUS, &status);
>	igt_debug("oa status %llx\n", status.oa_status);
> +	errno = _e;
>
>	return status.oa_status;
>  }
> --
> 2.45.2
>

  reply	other threads:[~2025-04-17 23:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 22:39 [PATCH i-g-t] tests/intel/xe_oa: Save and restore errno in get_stream_status Umesh Nerlige Ramappa
2025-04-17 23:00 ` Dixit, Ashutosh [this message]
2025-04-17 23:56 ` ✗ Xe.CI.BAT: failure for " Patchwork
2025-04-18  0:01   ` Umesh Nerlige Ramappa
2025-04-17 23:59 ` ✓ i915.CI.BAT: success " Patchwork
2025-04-18 11:21 ` ✓ i915.CI.Full: " Patchwork
2025-04-18 17:41 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-18 23:20   ` 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=85zfgeqtp8.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.