public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] i915/gem_ctx_exec: Restore i915.enable_hangcheck before failing
@ 2019-10-24 23:29 Chris Wilson
  2019-10-25  0:53 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2019-10-24 23:29 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If the test fails, don't abort leaving the global i915.enable_hangcheck
still disabled as that may affect later tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_ctx_exec.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index 92e899869..1e14bef62 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -209,6 +209,7 @@ static void nohangcheck_hostile(int i915)
 	igt_spin_t *spin;
 	uint32_t ctx;
 	int dir;
+	int err;
 
 	/*
 	 * Even if the user disables hangcheck during their context,
@@ -225,12 +226,18 @@ static void nohangcheck_hostile(int i915)
 	spin = igt_spin_new(i915, ctx, .flags = IGT_SPIN_NO_PREEMPTION);
 	gem_context_destroy(i915, ctx);
 
-	igt_assert_eq(gem_wait(i915, spin->handle, &timeout), 0);
-
-	igt_require(__enable_hangcheck(dir, true));
+	err = gem_wait(i915, spin->handle, &timeout);
+	if (err)
+		igt_debugfs_dump(i915, "i915_engine_info");
 
 	igt_spin_free(i915, spin);
+
+	igt_require(__enable_hangcheck(dir, true));
 	gem_quiescent_gpu(i915);
+
+	igt_assert_f(err == 0,
+		     "Hostile unpreemptable context was not cancelled immediately upon closure\n");
+
 	close(dir);
 }
 
-- 
2.24.0.rc0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-26 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-24 23:29 [igt-dev] [PATCH i-g-t] i915/gem_ctx_exec: Restore i915.enable_hangcheck before failing Chris Wilson
2019-10-25  0:53 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-10-25  8:03 ` [igt-dev] [PATCH i-g-t] " Joonas Lahtinen
2019-10-26 13:00 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox