kms_flip: Assert that hang_gpu() should only fail is the GPU is already hung
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Feb 2014 15:08:22 +0000 (15:08 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Feb 2014 15:19:01 +0000 (15:19 +0000)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tests/kms_flip.c

index bb105c8..a42b446 100644 (file)
@@ -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;
        }