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

Submitted by Chris Wilson on Nov. 28, 2018, 10:52 p.m.

Details

Message ID 20181128225231.29228-2-chris@chris-wilson.co.uk
State New
Series "Series without cover letter"
Headers show

Commit Message

Chris Wilson Nov. 28, 2018, 10:52 p.m.
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@chris-wilson.co.uk>
---
 lib/igt_gt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

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");