From 5a05e4194051f2483fd7f77e3a50db451123c361 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 7 Mar 2019 10:12:11 +1000 Subject: [PATCH] test: clip the exit code to 255 If more than 255 tests fail, we're returning an exit code outside of the POSIX standard. This only takes effect for -j1, where we fork off we only ever have a failed value of 1 anyway. Signed-off-by: Peter Hutterer --- test/litest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/litest.c b/test/litest.c index 9f38ee16..c5c72dce 100644 --- a/test/litest.c +++ b/test/litest.c @@ -4100,6 +4100,6 @@ main(int argc, char **argv) #endif } - return failed_tests; + return min(failed_tests, 255); } #endif