[igt-dev] [PATCH i-g-t] i915/perf_pmu: Check for hangs allowed

Chris Wilson chris at chris-wilson.co.uk
Mon Jan 28 10:18:49 UTC 2019


Check we can reset the GPU before running the reset test.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
Different meaning of flags, it's not the ring id!
---
 tests/perf_pmu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 21292bf3a..c9881e59f 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);
+			}
 		}
 
 		/**
-- 
2.20.1



More information about the igt-dev mailing list