mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 21:02:59 +00:00
lib/core: Add optional reason for timeout failure
"Timed out" isn't a terribly informative message, allow users to set something more informative. Inspired by a request from Jesse. Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
+2
-2
@@ -1614,9 +1614,9 @@ static void test_nonblocking_read(int in)
|
||||
}
|
||||
igt_require(ret != -1);
|
||||
|
||||
igt_set_timeout(5);
|
||||
igt_set_timeout(5, "Nonblocking DRM fd reading");
|
||||
ret = read(fd, buffer, sizeof(buffer));
|
||||
igt_set_timeout(0);
|
||||
igt_set_timeout(0, NULL);
|
||||
igt_assert_eq(ret, -1);
|
||||
igt_assert_eq(errno, EAGAIN);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user