failtest: stop when leak detected.
[ccan] / ccan / failtest / failtest.c
index 1dad0864aa372fa3b7ead07a081f9e125f192bbc..56ace7431847c5ac9fd059b77d4b9271958a3fb7 100644 (file)
@@ -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);
 }