lib/core: Add igt_reset_timeout

Convenience wrapper suggested by Chris for igt_set_timeout(0, NULL).

v2: While at it add an empty line in kms_flip to make
set/reset_timeout a visual block.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
Daniel Vetter
2015-08-07 19:12:07 +02:00
parent 370c989723
commit 5b0a8433fd
4 changed files with 18 additions and 3 deletions
+2 -1
View File
@@ -1616,7 +1616,8 @@ static void test_nonblocking_read(int in)
igt_set_timeout(5, "Nonblocking DRM fd reading");
ret = read(fd, buffer, sizeof(buffer));
igt_set_timeout(0, NULL);
igt_reset_timeout();
igt_assert_eq(ret, -1);
igt_assert_eq(errno, EAGAIN);