summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-07-20 13:25:11 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-02-21 16:41:09 +0000
commit8ca0b308acdcf53fac3cf2ea3861f5f911b16986 (patch)
tree2b38680bdc583724c21b6a732ad0d0c90843f7b5
parente0e24a67dfcfa12e54b37367e06b33fa87591aac (diff)
igt/drv_hangman: Skip if resets are disallowed
If we tell the machine to reset but they are disallowed, we will leave the system in a wedged state, preventing the majority of subsequent tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
-rw-r--r--tests/i915/i915_hangman.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c
index df1e0afe..4e515e3a 100644
--- a/tests/i915/i915_hangman.c
+++ b/tests/i915/i915_hangman.c
@@ -257,6 +257,7 @@ static void hangcheck_unterminated(void)
igt_main
{
const struct intel_execution_engine *e;
+ igt_hang_t hang = {};
igt_skip_on_simulation();
@@ -266,6 +267,8 @@ igt_main
device = drm_open_driver(DRIVER_INTEL);
igt_require_gem(device);
+ hang = igt_allow_hang(device, 0, HANG_ALLOW_CAPTURE);
+
sysfs = igt_sysfs_open(device, &idx);
igt_assert(sysfs != -1);
@@ -288,4 +291,8 @@ igt_main
igt_subtest("hangcheck-unterminated")
hangcheck_unterminated();
+
+ igt_fixture {
+ igt_disallow_hang(device, hang);
+ }
}