public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@list.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915/gem_ctx_exec: Restore i915.enable_hangcheck before failing
Date: Fri, 25 Oct 2019 00:29:03 +0100	[thread overview]
Message-ID: <20191024232903.15720-1-chris@chris-wilson.co.uk> (raw)

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

             reply	other threads:[~2019-10-24 23:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 23:29 Chris Wilson [this message]
2019-10-25  0:53 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_ctx_exec: Restore i915.enable_hangcheck before failing 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191024232903.15720-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@list.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox