summaryrefslogtreecommitdiff
path: root/tests/debugfs_test.c
diff options
context:
space:
mode:
authorAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2017-07-12 12:06:55 +0300
committerAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2017-07-17 10:06:04 +0300
commit4fd7a5f76dbde723a749ea8e9a8d68b73487b712 (patch)
treebbd38d1ea74f82c92bb1698d653d88b4dd05a85d /tests/debugfs_test.c
parentdb0e5fa6ae7b951f41b3055a6b37efedfe6d0f9a (diff)
tests/debugfs_test: Add a shorter timeout when reading sysfs entries
This allows us to proceed gracefully without invoking the global CI-level timeout especially when opening the buggy crtc-data file descriptor. Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tests/debugfs_test.c')
-rw-r--r--tests/debugfs_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index 287ffeb3..122f7dc8 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -50,8 +50,11 @@ static void read_and_discard_sysfs_entries(int path_fd, bool is_crc)
read_and_discard_sysfs_entries(sub_fd, !strcmp(dirent->d_name, "crc"));
close(sub_fd);
} else {
- char *buf = igt_sysfs_get(path_fd, dirent->d_name);
+ char *buf;
+ igt_set_timeout(5, "reading sysfs entry");
+ buf = igt_sysfs_get(path_fd, dirent->d_name);
+ igt_reset_timeout();
/*
* /crtc-XX/crc/data may fail with -EIO if the CRTC
* is not active.