All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] tests/debugfs_test: Add a shorter timeout when reading sysfs entries
Date: Wed, 12 Jul 2017 12:17:24 +0300	[thread overview]
Message-ID: <1499851044-4678-1-git-send-email-abdiel.janulgue@linux.intel.com> (raw)

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>
---
 tests/debugfs_test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index fb1735b..aefc123 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -52,8 +52,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.
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-07-12  9:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  9:17 Abdiel Janulgue [this message]
2017-07-14 11:37 ` [PATCH i-g-t] tests/debugfs_test: Add a shorter timeout when reading sysfs entries Arkadiusz Hiler

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=1499851044-4678-1-git-send-email-abdiel.janulgue@linux.intel.com \
    --to=abdiel.janulgue@linux.intel.com \
    --cc=intel-gfx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.