From: Ngai-Mint Kwan <ngai-mint.kwan@linux.intel.com>
To: gustavo.sousa@intel.com, igt-dev@lists.freedesktop.org
Cc: Ngai-Mint Kwan <ngai-mint.kwan@linux.intel.com>
Subject: [PATCH i-g-t v1] lib/igt_debugfs: Add "errno" to debug print
Date: Wed, 8 Jul 2026 15:52:12 -0700 [thread overview]
Message-ID: <20260708225223.866079-1-ngai-mint.kwan@linux.intel.com> (raw)
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
next reply other threads:[~2026-07-08 22:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 22:52 Ngai-Mint Kwan [this message]
2026-07-08 23:29 ` ✓ Xe.CI.BAT: success for lib/igt_debugfs: Add "errno" to debug print 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
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=20260708225223.866079-1-ngai-mint.kwan@linux.intel.com \
--to=ngai-mint.kwan@linux.intel.com \
--cc=gustavo.sousa@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox