mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-09 08:56:11 +00:00
lib: set a timeout when reading crc values
Signed-off-by: Thomas Wood <thomas.wood@intel.com> Acked-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
d8e5313a27
commit
c03d58595e
@ -459,7 +459,10 @@ static bool read_one_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out)
|
|||||||
ssize_t bytes_read;
|
ssize_t bytes_read;
|
||||||
char buf[pipe_crc->buffer_len];
|
char buf[pipe_crc->buffer_len];
|
||||||
|
|
||||||
|
igt_set_timeout(5);
|
||||||
bytes_read = read(pipe_crc->crc_fd, &buf, pipe_crc->line_len);
|
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);
|
igt_assert_cmpint(bytes_read, ==, pipe_crc->line_len);
|
||||||
buf[bytes_read] = '\0';
|
buf[bytes_read] = '\0';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user