[Intel-gfx] [PATCH igt 2/2] igt/debugfs_tests: Record which file is being opened in kmsg

Chris Wilson chris at chris-wilson.co.uk
Wed Dec 6 16:38:04 UTC 2017


When tracking down the cause of a particular kernel warning, knowing
which file it is associated with can be a big clue. So write the
filename into the kernel message log prior to opening it.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/debugfs_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index 268d6e78f..2e87e4420 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -61,8 +61,9 @@ static void read_and_discard_sysfs_entries(int path_fd, int indent)
 			int sub_fd;
 			ssize_t ret;
 
-			igt_set_timeout(5, "reading sysfs entry");
+			igt_kmsg(KMSG_DEBUG "Reading file \"%s\"\n", dirent->d_name);
 			igt_debug("%sReading file \"%s\"\n", tabs, dirent->d_name);
+			igt_set_timeout(5, "reading sysfs entry");
 
 			sub_fd = openat(path_fd, dirent->d_name, O_RDONLY);
 			if (sub_fd == -1) {
-- 
2.15.1



More information about the Intel-gfx mailing list