public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] i915/gem_eio: Assert the hanging request is correctly identified
@ 2019-07-02 11:48 Chris Wilson
  2019-07-02 13:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Chris Wilson @ 2019-07-02 11:48 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

When forcing a reset, it is crucial that the kernel correctly identifies
the injected hang. Verify this is the case for reset-stress.

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

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 5396a04e2..1d75f357f 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -175,7 +175,7 @@ static igt_spin_t * __spin_poll(int fd, uint32_t ctx, unsigned long flags)
 	struct igt_spin_factory opts = {
 		.ctx = ctx,
 		.engine = flags,
-		.flags = IGT_SPIN_FAST,
+		.flags = IGT_SPIN_FAST | IGT_SPIN_FENCE_OUT,
 	};
 
 	if (gem_can_store_dword(fd, opts.engine))
@@ -270,12 +270,12 @@ static void check_wait(int fd, uint32_t bo, unsigned int wait, igt_stats_t *st)
 		igt_stats_push(st, igt_nsec_elapsed(&ts));
 }
 
-static void check_wait_elapsed(int fd, igt_stats_t *st)
+static void check_wait_elapsed(const char *prefix, int fd, igt_stats_t *st)
 {
 	double med, max, limit;
 
-	igt_info("Completed %d resets, wakeups took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms)\n",
-		 st->n_values,
+	igt_info("%s: completed %d resets, wakeups took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms)\n",
+		 prefix, st->n_values,
 		 igt_stats_get_mean(st)*1e-6,
 		 igt_stats_get_std_deviation(st)*1e-6,
 		 igt_stats_get_min(st)*1e-6,
@@ -715,8 +715,8 @@ static void test_inflight_internal(int fd, unsigned int wait)
 	close(fd);
 }
 
-static void reset_stress(int fd,
-			 uint32_t ctx0, unsigned int engine,
+static void reset_stress(int fd, uint32_t ctx0,
+			 const char *name, unsigned int engine,
 			 unsigned int flags)
 {
 	const uint32_t bbe = MI_BATCH_BUFFER_END;
@@ -759,6 +759,8 @@ static void reset_stress(int fd,
 
 		/* Wedge after a small delay. */
 		check_wait(fd, obj.handle, 100e3, &stats);
+		igt_assert_eq(sync_fence_status(hang->out_fence), -EIO);
+		igt_spin_free(fd, hang);
 
 		/* Unwedge by forcing a reset. */
 		igt_assert(i915_reset_control(true));
@@ -779,10 +781,9 @@ static void reset_stress(int fd,
 			gem_execbuf(fd, &execbuf);
 
 		gem_sync(fd, obj.handle);
-		igt_spin_free(fd, hang);
 		gem_context_destroy(fd, ctx);
 	}
-	check_wait_elapsed(fd, &stats);
+	check_wait_elapsed(name, fd, &stats);
 	igt_stats_fini(&stats);
 
 	gem_close(fd, obj.handle);
@@ -797,7 +798,7 @@ static void test_reset_stress(int fd, unsigned int flags)
 	unsigned int engine;
 
 	for_each_engine(fd, engine)
-		reset_stress(fd, ctx0, engine, flags);
+		reset_stress(fd, ctx0, e__->name, engine, flags);
 
 	gem_context_destroy(fd, ctx0);
 }
-- 
2.20.1

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

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

end of thread, other threads:[~2019-07-05 11:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-02 11:48 [igt-dev] [PATCH i-g-t] i915/gem_eio: Assert the hanging request is correctly identified Chris Wilson
2019-07-02 13:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-07-02 14:23 ` [igt-dev] [PATCH i-g-t] " Chris Wilson
2019-07-05  8:01   ` Chris Wilson
2019-07-05 11:02     ` Mika Kuoppala
2019-07-02 15:25 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_eio: Assert the hanging request is correctly identified (rev2) Patchwork
2019-07-03  8:11 ` [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_eio: Assert the hanging request is correctly identified Patchwork
2019-07-03 12:26 ` [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_eio: Assert the hanging request is correctly identified (rev2) Patchwork

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