[igt-dev] [PATCH i-g-t 2/2] lib: Only require we have i915.reset module parameter for allow-hang

Chris Wilson chris at chris-wilson.co.uk
Wed Nov 28 22:52:31 UTC 2018


To control hang detection, we manipulate the i915.reset module
parameter. However, to be nice we should SKIP if we cannot modify the
parameter as opposed to outright FAILing.

References: https://bugs.freedesktop.org/show_bug.cgi?id=108891
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 lib/igt_gt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index a20619246..9683b3e5a 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -170,8 +170,8 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags)
 	 */
 	igt_require_gem(fd);
 
-	igt_assert(igt_sysfs_set_parameter
-		   (fd, "reset", "%d", INT_MAX /* any reset method */));
+	igt_require(igt_sysfs_set_parameter
+		    (fd, "reset", "%d", INT_MAX /* any reset method */));
 
 	if (!igt_check_boolean_env_var("IGT_HANG", true))
 		igt_skip("hang injection disabled by user");
-- 
2.20.0.rc1



More information about the igt-dev mailing list