summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-01-03 14:57:25 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-01-04 11:43:41 +0000
commita3f0d75d19aa252d3896af4763d6a9a5172f8814 (patch)
tree7a99b5ae1ed68e9d813bae33aa6ed61a867c2b73 /tests
parent31811f4b6c5a95de82e47ddf1f37739c3b2cfc58 (diff)
igt/gem_exec_fence: Check sync_file->status after the fence is signaled
After the fence is signaled, the status feed reports whether or not the request completed successfully. We set this to -EIO if a hang was detected. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_exec_fence.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c
index ea007468..30fe77c2 100644
--- a/tests/gem_exec_fence.c
+++ b/tests/gem_exec_fence.c
@@ -22,6 +22,7 @@
*/
#include "igt.h"
+#include "sw_sync.h"
#include <sys/ioctl.h>
#include <sys/poll.h>
@@ -140,7 +141,7 @@ static void test_fence_busy(int fd, unsigned ring, unsigned flags)
batch = gem_mmap__wc(fd, obj.handle, 0, 4096, PROT_WRITE);
gem_set_domain(fd, obj.handle,
- I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
+ I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
reloc.target_handle = obj.handle; /* recurse */
reloc.presumed_offset = 0;
@@ -194,6 +195,8 @@ static void test_fence_busy(int fd, unsigned ring, unsigned flags)
}
igt_assert(!gem_bo_busy(fd, obj.handle));
+ igt_assert_eq(sync_fence_status(fence),
+ flags & HANG ? -EIO : SYNC_FENCE_OK);
close(fence);
gem_close(fd, obj.handle);