From bfc580f54fb90295f7375ae166446e334e6ebd17 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Fri, 26 Nov 2021 10:42:12 +1300 Subject: [PATCH] lib/tests: Don't return non-zero values from checks The exit codes aren't used for anything. --- lib/tests/modules.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 527e49032843..67d4e589bdef 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -32,11 +32,9 @@ checkConfigOutput() { shift if evalConfig "$@" 2>/dev/null | grep --silent "$outputContains" ; then pass=$((pass + 1)) - return 0 else echo 2>&1 "error: Expected result matching '$outputContains', while evaluating" reportFailure "$@" - return 1 fi } @@ -47,15 +45,12 @@ checkConfigError() { if err="$(evalConfig "$@" 2>&1 >/dev/null)"; then echo 2>&1 "error: Expected error code, got exit code 0, while evaluating" reportFailure "$@" - return 1 else if echo "$err" | grep -zP --silent "$errorContains" ; then pass=$((pass + 1)) - return 0 else echo 2>&1 "error: Expected error matching '$errorContains', while evaluating" reportFailure "$@" - return 1 fi fi }