Have compat.sh and ssl-opt.sh not return success for > 255 errors
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
diff --git a/tests/compat.sh b/tests/compat.sh
index c06694e..f6a51c4 100755
--- a/tests/compat.sh
+++ b/tests/compat.sh
@@ -1445,8 +1445,7 @@
echo "------------------------------------------------------------------------"
-if [ $FAILED -ne 0 -o $SRVMEM -ne 0 ];
-then
+if [ $FAILED -ne 0 -o $SRVMEM -ne 0 ]; then
printf "FAILED"
else
printf "PASSED"
@@ -1462,4 +1461,9 @@
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