diff options
author | Thomas Haller <thaller@redhat.com> | 2023-09-18 20:45:20 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-09-18 22:07:02 +0200 |
commit | 9d416f44e8103ca4c29b4e0f16a146cae0fd3c21 (patch) | |
tree | afb35732a933c4ab417645f79ba8b63205ed32be /tests | |
parent | 50867e134603348e3f8eeb8e4c1b171516212503 (diff) |
tests/shell: don't show the exit status for failed tests
Previously, for failed tests we would print the exit code
W: [FAILED] 2/2 tests/shell/testcases/listing/0013objects_0: got 1
This doesn't seem very useful. For one, we have special exit codes like
0 (OK), 77 (SKIPPED), 124 (DUMP FAIL), 123 (TAINTED), 122 (VALGRIND).
Any other exit code is just an arbitrary failure. We don't define any
special codes, and printing them is not useful.
Note that further exit codes (118 - 121) are reserved, and could be
special purposed, when there is a use.
You can find the real exit code from the test in the result data in the
"rc-failed" file.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/shell/run-tests.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh index 79c818cb..418fab95 100755 --- a/tests/shell/run-tests.sh +++ b/tests/shell/run-tests.sh @@ -704,7 +704,6 @@ print_test_header() { local testfile="$2" local testidx_completed="$3" local status="$4" - local suffix="$5" local text local s_idx @@ -713,7 +712,7 @@ print_test_header() { s_idx="$text/${#TESTS[@]}" align_text text left 12 "[$status]" - _msg "$msglevel" "$text $s_idx $testfile${suffix:+: $suffix}" + _msg "$msglevel" "$text $s_idx $testfile" } print_test_result() { @@ -722,7 +721,6 @@ print_test_result() { local rc_got="$3" local result_msg_level="I" - local result_msg_suffix="" local result_msg_files=( "$NFT_TEST_TESTTMPDIR/testout.log" "$NFT_TEST_TESTTMPDIR/ruleset-diff" ) local result_msg_status @@ -743,13 +741,12 @@ print_test_result() { result_msg_status="DUMP FAIL" else result_msg_status="FAILED" - result_msg_suffix="got $rc_got" fi result_msg_status="$RED$result_msg_status$RESET" result_msg_files=( "$NFT_TEST_TESTTMPDIR/testout.log" ) fi - print_test_header "$result_msg_level" "$testfile" "$((ok + skipped + failed))" "$result_msg_status" "$result_msg_suffix" + print_test_header "$result_msg_level" "$testfile" "$((ok + skipped + failed))" "$result_msg_status" if [ "$VERBOSE" = "y" ] ; then local f @@ -773,7 +770,7 @@ job_start() { local testidx="$2" if [ "$NFT_TEST_JOBS" -le 1 ] ; then - print_test_header I "$testfile" "$testidx" "EXECUTING" "" + print_test_header I "$testfile" "$testidx" "EXECUTING" fi NFT_TEST_TESTTMPDIR="${JOBS_TEMPDIR["$testfile"]}" \ |