From: Antonio Argenziano <antonio.argenziano@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2] igt/gem_reset_stats: Fix pending batches status expectation
Date: Mon, 12 Jun 2017 14:37:05 -0700 [thread overview]
Message-ID: <20170612213705.7575-1-antonio.argenziano@intel.com> (raw)
Test expects pending batches to be discarded after a reset. After commit
821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests"),
That is no longer the case. Fixed to expect a normal execution.
V2: Updated commit message (Michel Thierry)
Cc: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
---
tests/gem_reset_stats.c | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
index c4ce4ac2..73afeeb2 100644
--- a/tests/gem_reset_stats.c
+++ b/tests/gem_reset_stats.c
@@ -239,7 +239,7 @@ static void test_rs(const struct intel_execution_engine *e,
if (i == hang_index)
assert_reset_status(i, fd[i], 0, RS_BATCH_ACTIVE);
if (i > hang_index)
- assert_reset_status(i, fd[i], 0, RS_BATCH_PENDING);
+ assert_reset_status(i, fd[i], 0, RS_NO_ERROR);
}
igt_assert(igt_seconds_elapsed(&ts_injected) <= 30);
@@ -312,10 +312,10 @@ static void test_rs_ctx(const struct intel_execution_engine *e,
RS_BATCH_ACTIVE);
if (i == hang_index && j > hang_context)
assert_reset_status(i, fd[i], ctx[i][j],
- RS_BATCH_PENDING);
+ RS_NO_ERROR);
if (i > hang_index)
assert_reset_status(i, fd[i], ctx[i][j],
- RS_BATCH_PENDING);
+ RS_NO_ERROR);
}
}
@@ -330,7 +330,7 @@ static void test_ban(const struct intel_execution_engine *e)
struct local_drm_i915_reset_stats rs_bad, rs_good;
int fd_bad, fd_good;
int ban, retry = 10;
- int active_count = 0, pending_count = 0;
+ int active_count = 0;
fd_bad = drm_open_driver(DRIVER_INTEL);
fd_good = drm_open_driver(DRIVER_INTEL);
@@ -350,9 +350,6 @@ static void test_ban(const struct intel_execution_engine *e)
noop(fd_good, 0, e);
noop(fd_good, 0, e);
- /* The second hang will count as pending and be discarded */
- active_count--;
- pending_count += 1; /* inject hang does 1 real exec + 1 dummy */
while (retry--) {
inject_hang(fd_bad, 0, e, BAN);
active_count++;
@@ -373,12 +370,10 @@ static void test_ban(const struct intel_execution_engine *e)
assert_reset_status(fd_bad, fd_bad, 0, RS_BATCH_ACTIVE);
igt_assert_eq(gem_reset_stats(fd_bad, 0, &rs_bad), 0);
igt_assert_eq(rs_bad.batch_active, active_count);
- igt_assert_eq(rs_bad.batch_pending, pending_count);
- assert_reset_status(fd_good, fd_good, 0, RS_BATCH_PENDING);
+ assert_reset_status(fd_good, fd_good, 0, RS_NO_ERROR);
igt_assert_eq(gem_reset_stats(fd_good, 0, &rs_good), 0);
igt_assert_eq(rs_good.batch_active, 0);
- igt_assert_eq(rs_good.batch_pending, 2);
close(fd_bad);
close(fd_good);
@@ -389,7 +384,7 @@ static void test_ban_ctx(const struct intel_execution_engine *e)
struct local_drm_i915_reset_stats rs_bad, rs_good;
int fd, ban, retry = 10;
uint32_t ctx_good, ctx_bad;
- int active_count = 0, pending_count = 0;
+ int active_count = 0;
fd = drm_open_driver(DRIVER_INTEL);
@@ -414,9 +409,6 @@ static void test_ban_ctx(const struct intel_execution_engine *e)
noop(fd, ctx_good, e);
noop(fd, ctx_good, e);
- /* This second hang will count as pending and be discarded */
- active_count--;
- pending_count++;
while (retry--) {
inject_hang(fd, ctx_bad, e, BAN);
active_count++;
@@ -437,12 +429,10 @@ static void test_ban_ctx(const struct intel_execution_engine *e)
assert_reset_status(fd, fd, ctx_bad, RS_BATCH_ACTIVE);
igt_assert_eq(gem_reset_stats(fd, ctx_bad, &rs_bad), 0);
igt_assert_eq(rs_bad.batch_active, active_count);
- igt_assert_eq(rs_bad.batch_pending, pending_count);
- assert_reset_status(fd, fd, ctx_good, RS_BATCH_PENDING);
+ assert_reset_status(fd, fd, ctx_good, RS_NO_ERROR);
igt_assert_eq(gem_reset_stats(fd, ctx_good, &rs_good), 0);
igt_assert_eq(rs_good.batch_active, 0);
- igt_assert_eq(rs_good.batch_pending, 2);
close(fd);
}
--
2.13.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2017-06-12 21:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 21:37 Antonio Argenziano [this message]
2017-06-12 23:54 ` [PATCH v2] igt/gem_reset_stats: Fix pending batches status expectation Michel Thierry
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=20170612213705.7575-1-antonio.argenziano@intel.com \
--to=antonio.argenziano@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.