diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-10-26 20:33:54 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-10-27 19:35:18 +0000 |
commit | def00442d5b9cbe6ca18ead23d80e8501d3fd517 (patch) | |
tree | 1720725ee5ed0707d4fd9d0c2da740d7a1f72596 /tests/i915/gem_ctx_exec.c | |
parent | 83ae897644c40381460d41f790f99649e4952394 (diff) |
i915/gem_ctx_exec: Enable resets for basic-nohangcheck
Wrap the test inside igt_allow_hang as we depend upon a fast reset to
cancel the hostile context.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Andi Shyti <andi.shyti@intel.com>
Diffstat (limited to 'tests/i915/gem_ctx_exec.c')
-rw-r--r-- | tests/i915/gem_ctx_exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c index b552edfb..6c2cd922 100644 --- a/tests/i915/gem_ctx_exec.c +++ b/tests/i915/gem_ctx_exec.c @@ -207,6 +207,7 @@ static void nohangcheck_hostile(int i915) { int64_t timeout = NSEC_PER_SEC / 2; igt_spin_t *spin; + igt_hang_t hang; uint32_t ctx; int err = 0; int dir; @@ -220,6 +221,7 @@ static void nohangcheck_hostile(int i915) igt_require(dir != -1); ctx = gem_context_create(i915); + hang = igt_allow_hang(i915, ctx, 0); igt_require(__enable_hangcheck(dir, false)); @@ -233,8 +235,9 @@ static void nohangcheck_hostile(int i915) igt_spin_free(i915, spin); - igt_require(__enable_hangcheck(dir, true)); + __enable_hangcheck(dir, true); gem_quiescent_gpu(i915); + igt_disallow_hang(i915, hang); igt_assert_f(err == 0, "Hostile unpreemptable context was not cancelled immediately upon closure\n"); |