public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] i915/gem_exec_scheduler: Disable alarm before exiting child
@ 2019-02-08 11:41 Chris Wilson
  2019-02-08 12:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2019-02-08 11:41 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Still the blighted

Starting subtest: pi-ringfull-bsd
child 0 died with signal 14, Alarm clock
Subtest pi-ringfull-bsd: FAIL (0.133s)

So let's make sure our timer cannot fire later on during exit.

References https://bugs.freedesktop.org/show_bug.cgi?id=109584
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 tests/i915/gem_exec_schedule.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index d11e57363..00f9528a3 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1153,7 +1153,9 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 	bind_to_cpu(0);
 
 	igt_fork(child, 1) {
-		result[0] = true;
+		int err;
+
+		result[0] = vip != execbuf.rsvd1;
 
 		igt_debug("Waking parent\n");
 		kill(getppid(), SIGALRM);
@@ -1170,12 +1172,18 @@ static void test_pi_ringfull(int fd, unsigned int engine)
 		 */
 		igt_debug("HP child executing\n");
 		execbuf.rsvd1 = vip;
-		result[2] = __execbuf(fd, &execbuf) == 0;
+		err = __execbuf(fd, &execbuf);
+		igt_debug("HP execbuf returned %d\n", err);
+
+		memset(&itv, 0, sizeof(itv));
+		setitimer(ITIMER_REAL, &itv, NULL);
+
+		result[2] = err == 0;
 	}
 
 	/* Relinquish CPU just to allow child to create a context */
 	sleep(1);
-	igt_assert_f(result[0], "HP context (child) not created");
+	igt_assert_f(result[0], "HP context (child) not created\n");
 	igt_assert_f(!result[1], "Child released too early!\n");
 
 	/* Parent sleeps waiting for ringspace, releasing child */
-- 
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] 4+ messages in thread

end of thread, other threads:[~2019-02-08 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-08 11:41 [igt-dev] [PATCH i-g-t] i915/gem_exec_scheduler: Disable alarm before exiting child Chris Wilson
2019-02-08 12:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-08 12:30 ` [igt-dev] [PATCH i-g-t] " Joonas Lahtinen
2019-02-08 13:42 ` [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