From: Thomas Wood <thomas.wood@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 2/2] lib: set a timeout when reading crc values
Date: Mon, 12 May 2014 11:35:21 +0100 [thread overview]
Message-ID: <1399890921-13068-2-git-send-email-thomas.wood@intel.com> (raw)
In-Reply-To: <1399890921-13068-1-git-send-email-thomas.wood@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
lib/igt_debugfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 4fd2e5a..0912f5b 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -459,7 +459,10 @@ static bool read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
ssize_t bytes_read;
char buf[pipe_crc->buffer_len];
+ igt_set_timeout(5);
bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len);
+ igt_set_timeout(0);
+
igt_assert_cmpint(bytes_read, ==, pipe_crc->line_len);
buf[bytes_read] = '\0';
--
1.9.0
next prev parent reply other threads:[~2014-05-12 10:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 10:35 [PATCH i-g-t 1/2] lib: add igt_set_timeout Thomas Wood
2014-05-12 10:35 ` Thomas Wood [this message]
2014-05-12 13:31 ` Damien Lespiau
2014-05-12 21:39 ` Daniel Vetter
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=1399890921-13068-2-git-send-email-thomas.wood@intel.com \
--to=thomas.wood@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox