Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/xe_oa: Save and restore errno in get_stream_status
@ 2025-04-17 22:39 Umesh Nerlige Ramappa
  2025-04-17 23:00 ` Dixit, Ashutosh
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Umesh Nerlige Ramappa @ 2025-04-17 22:39 UTC (permalink / raw)
  To: igt-dev, Ashutosh Dixit

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)

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-04-18 23:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox