From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] lib: Report wait() failures
Date: Tue, 28 Jan 2020 12:44:59 +0200 [thread overview]
Message-ID: <87imkvn9lg.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200127161439.2941023-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Check the error status from a wait() failure and propagate if not SIGINT
> -- to avoid falling into a trap of an infinite error loop.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> lib/igt_core.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 0a0068946..72d55d5c2 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -2174,8 +2174,14 @@ int __igt_waitchildren(void)
> int c;
>
> pid = wait(&status);
> - if (pid == -1)
> - continue;
> + if (pid == -1) {
> + if (errno == EINTR)
> + continue;
> +
> + printf("wait(num_children:%d) failed with %m\n",
> + num_test_children - count);
> + return IGT_EXIT_FAILURE;
> + }
>
> for (c = 0; c < num_test_children; c++)
> if (pid == test_children[c])
> --
> 2.25.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-01-28 10:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 16:14 [igt-dev] [PATCH i-g-t] lib: Report wait() failures Chris Wilson
2020-01-27 19:20 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-01-28 10:44 ` Mika Kuoppala [this message]
2020-01-28 13:06 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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=87imkvn9lg.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox