From acb6106ca2778d74af91f9b92bc32df179195b6b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 30 Nov 2011 09:14:11 +1030 Subject: [PATCH] failtest: stop when leak detected. Don't continue when we report a leak: tell the parent it's a failure. --- ccan/failtest/failtest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index 1dad0864..56ace743 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -488,7 +488,10 @@ static NORETURN void failtest_cleanup(bool forced_cleanup, int status) } free_everything(); - tell_parent(SUCCESS); + if (status == 0) + tell_parent(SUCCESS); + else + tell_parent(FAILURE); exit(status); } -- 2.39.2