diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-05 11:55:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-21 15:12:54 +0100 |
commit | 310eaeb60579110c5a8e2f31d87ec659ab66b3b8 (patch) | |
tree | 2bdfce0dd80ff3280fa85daf0e80cf705ec00c56 /lib/igt_gt.c | |
parent | d517ee729ddbe2bb8a5c6cc10e7ce35d73a8bd82 (diff) |
lib: Force global reset + uevents for hang detector
The hang detector relies on a uevent for notification and aborting the
test. As proposed, fine-grained resets may not produce a global uevent
and so this hang detection becomes void. As we don't expect any hang, we
can just reduce the reset to only a global + uevent and so maintain
functionality, and switch back to fine-grained resets afterwards.
Note that any test that requires testing fine-grained resets should
ensure that they are enabled first as igt may leave the global
parameters in an inconsistent state.
v2: Restore fine-grained resets for explict igt_allow_hang()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Diffstat (limited to 'lib/igt_gt.c')
-rw-r--r-- | lib/igt_gt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c index be44fcae..6f7daa5e 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -21,6 +21,7 @@ * IN THE SOFTWARE. */ +#include <limits.h> #include <string.h> #include <strings.h> #include <signal.h> @@ -162,6 +163,9 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags) struct local_i915_gem_context_param param; unsigned ban; + igt_assert(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"); gem_context_require_bannable(fd); |