[igt-dev] [PATCH i-g-t] i915/gem_exec_scheduler: Disable alarm before exiting child

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Feb 8 12:30:37 UTC 2019


Quoting Chris Wilson (2019-02-08 13:41:09)
> 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.

This starts to reek like broken libc.

The patch below is just next level of paranoia, so:

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas

> 
> References https://bugs.freedesktop.org/show_bug.cgi?id=109584
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at 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
> 


More information about the igt-dev mailing list