summaryrefslogtreecommitdiff
path: root/tests/gem_busy.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-01-27 12:32:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-01-27 12:32:35 +0000
commit86361171b7948b8ff99360627ade0acef0882a3d (patch)
tree9aebbae1990db78db27973443ca3487d400757d6 /tests/gem_busy.c
parent37c80354ff029209d62b8ee9a2d79e8d57230c0b (diff)
igt/gem_busy: Add diagnostics for missed hangcheck
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_busy.c')
-rw-r--r--tests/gem_busy.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/gem_busy.c b/tests/gem_busy.c
index 98a3a785..edd74d9e 100644
--- a/tests/gem_busy.c
+++ b/tests/gem_busy.c
@@ -486,8 +486,16 @@ static void basic(int fd, unsigned ring, unsigned flags)
igt_assert(busy);
memset(&tv, 0, sizeof(tv));
- while (gem_bo_busy(fd, spin->handle))
- igt_assert(igt_seconds_elapsed(&tv) < timeout);
+ while (gem_bo_busy(fd, spin->handle)) {
+ if (igt_seconds_elapsed(&tv) > timeout) {
+ igt_debugfs_dump(fd, "i915_engine_info");
+ igt_debugfs_dump(fd, "i915_hangcheck_info");
+ igt_assert_f(igt_seconds_elapsed(&tv) < timeout,
+ "%s batch did not complete within %ds\n",
+ flags & HANG ? "Hanging" : "Normal",
+ timeout);
+ }
+ }
igt_spin_batch_free(fd, spin);
}