diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2016-10-25 21:07:02 +0000 |
---|---|---|
committer | Robert Foss <robert.foss@collabora.com> | 2017-02-02 13:51:44 -0500 |
commit | 23d4f2d4a62585cb4e1d951bf7e4d375ee8642cf (patch) | |
tree | 458de96b98126ee5fe446ffc39a75514f8e9b6ab /tests/kms_atomic_transition.c | |
parent | 8967235d23bc3bd0c242da9aa7384257c31c4f89 (diff) |
tests/kms_atomic_transition: use igt timeout instead of blocking
If the event never arrives we can timeout and end the test.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Diffstat (limited to 'tests/kms_atomic_transition.c')
-rw-r--r-- | tests/kms_atomic_transition.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c index 5fdb6175..095af515 100644 --- a/tests/kms_atomic_transition.c +++ b/tests/kms_atomic_transition.c @@ -383,7 +383,9 @@ static void commit_display(igt_display_t *display, unsigned event_mask, bool non struct drm_event_vblank *vblank = (void *)buf; uint32_t crtc_id, pipe = I915_MAX_PIPES; + igt_set_timeout(3, "Timed out while reading drm_fd\n"); ret = read(display->drm_fd, buf, sizeof(buf)); + igt_reset_timeout(); if (ret < 0 && (errno == EINTR || errno == EAGAIN)) continue; |