From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915_hangman: Force error capture
Date: Thu, 3 Oct 2019 16:23:02 +0100 [thread overview]
Message-ID: <20191003152302.14818-1-chris@chris-wilson.co.uk> (raw)
For fast preempt-resets, error capture is skipped, so disable
preempt-resets before checking the error state. While thinking ahead, be
prepared for when the modparams are not accessible.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
lib/igt_gt.c | 7 ++++---
tests/i915/i915_hangman.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 78e3cd089..5ca77471c 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -162,6 +162,7 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags)
struct drm_i915_gem_context_param param = {
.ctx_id = ctx,
};
+ int allow_reset;
unsigned ban;
/*
@@ -177,9 +178,7 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags)
if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false))
igt_require(has_gpu_reset(fd));
- igt_require(igt_sysfs_set_parameter
- (fd, "reset", "%d", INT_MAX /* any reset method */));
-
+ allow_reset = 1;
if ((flags & HANG_ALLOW_CAPTURE) == 0) {
param.param = I915_CONTEXT_PARAM_NO_ERROR_CAPTURE;
param.value = 1;
@@ -188,7 +187,9 @@ igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags)
* the right one).
*/
__gem_context_set_param(fd, ¶m);
+ allow_reset = INT_MAX; /* any reset method */
}
+ igt_require(igt_sysfs_set_parameter(fd, "reset", "%d", allow_reset));
ban = context_get_ban(fd, ctx);
if ((flags & HANG_ALLOW_BAN) == 0)
diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c
index 58141fc92..7a158d8db 100644
--- a/tests/i915/i915_hangman.c
+++ b/tests/i915/i915_hangman.c
@@ -140,12 +140,13 @@ static void check_error_state(const char *expected_ring_name,
size_t line_size = 0;
bool found = false;
- igt_debug("%s(expected ring name=%s, expected offset=%"PRIx64")\n",
- __func__, expected_ring_name, expected_offset);
igt_debugfs_dump(device, "i915_error_state");
igt_assert(getline(&line, &line_size, file) != -1);
- igt_assert(strcasecmp(line, "No error state collected"));
+ igt_require(strcasecmp(line, "No error state collected"));
+
+ igt_debug("%s(expected ring name=%s, expected offset=%"PRIx64")\n",
+ __func__, expected_ring_name, expected_offset);
while (getline(&line, &line_size, file) > 0) {
char *dashes;
--
2.23.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-10-03 15:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 15:23 Chris Wilson [this message]
2019-10-03 15:46 ` [igt-dev] ✗ GitLab.Pipeline: warning for i915_hangman: Force error capture Patchwork
2019-10-03 16:04 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-10-04 0:26 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-10-15 13:31 ` [igt-dev] [PATCH i-g-t] " Andi Shyti
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=20191003152302.14818-1-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.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