From 0cc6a219f1de667ddc0c9a4011dc1c36a584be7b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 21 Feb 2014 15:08:22 +0000 Subject: [PATCH] kms_flip: Assert that hang_gpu() should only fail is the GPU is already hung Signed-off-by: Chris Wilson --- tests/kms_flip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index bb105c81..a42b4469 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -747,6 +747,9 @@ static uint32_t hang_gpu(int fd) execbuf.batch_len = sizeof(b); if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf)) { + igt_assert_f(errno == EIO, + "failed to exercise page flip hang recovery\n"); + unhang_gpu(fd, gem_exec.handle); gem_exec.handle = 0; }