diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-21 11:28:46 +0000 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2018-02-27 13:04:05 +0200 |
commit | 4ec1bf5c6ca4d82e6ea4eac8860ac2f02f4f8b1b (patch) | |
tree | 229a2a751860ec4d1e0b9d41a146bea50f874624 /tests/debugfs_test.c | |
parent | ee7c191868a6a681665d62eca5fd180ed8a2896f (diff) |
igt/debugfs_tests: Record which file is being opened in kmsg
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@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tests/debugfs_test.c')
-rw-r--r-- | tests/debugfs_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c index 268d6e78..2e87e442 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) { |