Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v1] lib/igt_debugfs: Add "errno" to debug print
@ 2026-07-08 22:52 Ngai-Mint Kwan
  2026-07-08 23:29 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Ngai-Mint Kwan @ 2026-07-08 22:52 UTC (permalink / raw)
  To: gustavo.sousa, igt-dev; +Cc: Ngai-Mint Kwan

When igt_debugfs_path() fails under igt_debugfs_dir(), add "errno" to the
debug print for additional context of the failure.

Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@linux.intel.com>
---
 lib/igt_debugfs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index ed0a20773..a8c45945c 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -187,8 +187,12 @@ int igt_debugfs_dir(int device)
 	int debugfs_dir_fd;
 	char path[200];
 
-	if (igt_debug_on(!igt_debugfs_path(device, path, sizeof(path))))
+	errno = 0;
+	if (igt_debug_on(!igt_debugfs_path(device, path, sizeof(path)))) {
+		igt_debug("Last errno: %i, %s\n", errno, strerror(errno));
+
 		return -1;
+	}
 
 	debugfs_dir_fd = open(path, O_RDONLY);
 	igt_debug_on_f(debugfs_dir_fd < 0, "path: %s\n", path);
-- 
2.43.0


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

end of thread, other threads:[~2026-07-13 14:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 22:52 [PATCH i-g-t v1] lib/igt_debugfs: Add "errno" to debug print Ngai-Mint Kwan
2026-07-08 23:29 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-07-08 23:52 ` ✓ i915.CI.BAT: " Patchwork
2026-07-09  3:56 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-07-09 16:55   ` Ngai-Mint Kwan
2026-07-09  5:35 ` [PATCH i-g-t v1] " Dandamudi, Priyanka
2026-07-09 22:56 ` ✗ i915.CI.Full: failure for " Patchwork
2026-07-13 14:45 ` [PATCH i-g-t v1] " Kamil Konieczny

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