summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-02-08 11:38:15 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-02-08 12:34:33 +0000
commit947301563259726b65ce47d3a3fe37931ed42efe (patch)
treea1d93beaa17d504d37d128da5e00e9899ced26df
parentcec046d72944a2d559ce5bd83358f08f20454005 (diff)
i915/gem_exec_scheduler: Disable alarm before exiting child
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> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
-rw-r--r--tests/i915/gem_exec_schedule.c14
1 files 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 */