public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Report wait() failures
@ 2020-01-27 16:14 Chris Wilson
  2020-01-27 19:20 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2020-01-27 16:14 UTC (permalink / raw)
  To: igt-dev

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>
---
 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

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

end of thread, other threads:[~2020-01-28 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [igt-dev] [PATCH i-g-t] " Mika Kuoppala
2020-01-28 13:06 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork

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