[igt-dev] [PATCH i-g-t 2/2] lib/gt: Check GEM is operation before injecting a hang

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 12 15:37:09 UTC 2018


To inject a hang, we execute a spinning batch. This means we require GEM
to be operation before the hang, so check.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 lib/igt_gt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 89b318ae6..86c6e1972 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -118,6 +118,7 @@ void igt_require_hang_ring(int fd, int ring)
 	if (!igt_check_boolean_env_var("IGT_HANG", true))
 		igt_skip("hang injection disabled by user");
 
+	igt_require_gem(fd);
 	gem_require_ring(fd, ring);
 	gem_context_require_bannable(fd);
 	if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false))
-- 
2.18.0



More information about the igt-dev mailing list