summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-04-11 14:08:51 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-04-11 14:14:12 +0100
commitf0c8bd8c451ec7c8cf23f0e527a4e64d1778323b (patch)
treeb29c6f8ccb3d91a37b147ab1b3fb6ce280ca536d /tests
parentd8b83aa82258c7ffd1fee0cd9409c01bd8b876ab (diff)
igt/gem_exec_fence: Restrict allowing hangs to hang tests
If the tests hang outside of the explicit hang tests, we want to fail and keep the error state for analysis. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_exec_fence.c60
1 files changed, 36 insertions, 24 deletions
diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c
index 357ef19f..dc21134b 100644
--- a/tests/gem_exec_fence.c
+++ b/tests/gem_exec_fence.c
@@ -321,8 +321,6 @@ igt_main
igt_require_gem(i915);
igt_require(gem_has_exec_fence(i915));
gem_require_mmap_wc(i915);
-
- igt_allow_hang(i915, 0, 0);
}
for (e = intel_execution_engines; e->name; e++) {
@@ -331,28 +329,42 @@ igt_main
igt_require(gem_has_ring(i915, e->exec_id | e->flags));
}
- igt_subtest_f("%sbusy-%s",
- e->exec_id == 0 ? "basic-" : "",
- e->name)
- test_fence_busy(i915, e->exec_id | e->flags, 0);
- igt_subtest_f("%swait-%s",
- e->exec_id == 0 ? "basic-" : "",
- e->name)
- test_fence_busy(i915, e->exec_id | e->flags, WAIT);
- igt_subtest_f("%sawait-%s",
- e->exec_id == 0 ? "basic-" : "",
- e->name)
- test_fence_await(i915, e->exec_id | e->flags, 0);
- igt_subtest_f("nb-await-%s", e->name)
- test_fence_await(i915, e->exec_id | e->flags, NONBLOCK);
- igt_subtest_f("busy-hang-%s", e->name)
- test_fence_busy(i915, e->exec_id | e->flags, HANG);
- igt_subtest_f("wait-hang-%s", e->name)
- test_fence_busy(i915, e->exec_id | e->flags, HANG | WAIT);
- igt_subtest_f("await-hang-%s", e->name)
- test_fence_await(i915, e->exec_id | e->flags, HANG);
- igt_subtest_f("nb-await-hang-%s", e->name)
- test_fence_await(i915, e->exec_id | e->flags, NONBLOCK | HANG);
+ igt_subtest_group {
+ igt_subtest_f("%sbusy-%s",
+ e->exec_id == 0 ? "basic-" : "",
+ e->name)
+ test_fence_busy(i915, e->exec_id | e->flags, 0);
+ igt_subtest_f("%swait-%s",
+ e->exec_id == 0 ? "basic-" : "",
+ e->name)
+ test_fence_busy(i915, e->exec_id | e->flags, WAIT);
+ igt_subtest_f("%sawait-%s",
+ e->exec_id == 0 ? "basic-" : "",
+ e->name)
+ test_fence_await(i915, e->exec_id | e->flags, 0);
+ igt_subtest_f("nb-await-%s", e->name)
+ test_fence_await(i915, e->exec_id | e->flags, NONBLOCK);
+ }
+
+ igt_subtest_group {
+ igt_hang_t hang;
+
+ igt_fixture {
+ hang = igt_allow_hang(i915, 0, 0);
+ }
+
+ igt_subtest_f("busy-hang-%s", e->name)
+ test_fence_busy(i915, e->exec_id | e->flags, HANG);
+ igt_subtest_f("wait-hang-%s", e->name)
+ test_fence_busy(i915, e->exec_id | e->flags, HANG | WAIT);
+ igt_subtest_f("await-hang-%s", e->name)
+ test_fence_await(i915, e->exec_id | e->flags, HANG);
+ igt_subtest_f("nb-await-hang-%s", e->name)
+ test_fence_await(i915, e->exec_id | e->flags, NONBLOCK | HANG);
+ igt_fixture {
+ igt_disallow_hang(i915, hang);
+ }
+ }
}
}