summaryrefslogtreecommitdiff
path: root/tests/perf_pmu.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-01-28 10:12:42 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-01-29 23:42:53 +0000
commitd8f9f063dfc440994fd097b0238ab11f3d299bc6 (patch)
treeb706d011366444e30c87cfd46dad70359f55d30b /tests/perf_pmu.c
parent96c2dfbbb2c10cd92ddc9fe22993371bc3ba36a1 (diff)
i915/perf_pmu: Check for hangs allowed
Check we can reset the GPU before running the reset test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/perf_pmu.c')
-rw-r--r--tests/perf_pmu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 21292bf3..c9881e59 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -1812,8 +1812,13 @@ igt_main
accuracy(fd, e, pct[i], 10);
}
- igt_subtest_f("busy-hang-%s", e->name)
+ igt_subtest_f("busy-hang-%s", e->name) {
+ igt_hang_t hang = igt_allow_hang(fd, 0, 0);
+
single(fd, e, TEST_BUSY | FLAG_HANG);
+
+ igt_disallow_hang(fd, hang);
+ }
}
/**