From fc0e79e70f41a125e4226c5cd2083d1a500a91a3 Mon Sep 17 00:00:00 2001 From: Tom Cosgrove Date: Fri, 13 Jan 2023 12:13:41 +0000 Subject: [PATCH] Have compat.sh and ssl-opt.sh not return success for > 255 errors Signed-off-by: Tom Cosgrove --- tests/compat.sh | 8 ++++++-- tests/ssl-opt.sh | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/compat.sh b/tests/compat.sh index fc2bfab7a..1454fecee 100755 --- a/tests/compat.sh +++ b/tests/compat.sh @@ -1106,8 +1106,7 @@ done echo "------------------------------------------------------------------------" -if [ $FAILED -ne 0 -o $SRVMEM -ne 0 ]; -then +if [ $FAILED -ne 0 -o $SRVMEM -ne 0 ]; then printf "FAILED" else printf "PASSED" @@ -1123,4 +1122,9 @@ PASSED=$(( $TESTS - $FAILED )) echo " ($PASSED / $TESTS tests ($SKIPPED skipped$MEMREPORT))" FAILED=$(( $FAILED + $SRVMEM )) +if [ $FAILED -gt 255 ]; then + # Clamp at 255 as caller gets exit code & 0xFF + # (so 256 would be 0, or success, etc) + FAILED=255 +fi exit $FAILED diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index c206283a2..37936fcf7 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -13312,4 +13312,9 @@ fi PASSES=$(( $TESTS - $FAILS )) echo " ($PASSES / $TESTS tests ($SKIPS skipped))" +if [ $FAILS -gt 255 ]; then + # Clamp at 255 as caller gets exit code & 0xFF + # (so 256 would be 0, or success, etc) + FAILS=255 +fi exit $FAILS