diff mbox series

[iptables,7/7] tests: shell: Return non-zero on error

Message ID 20210906163038.15381-7-phil@nwl.cc
State Accepted
Delegated to: Pablo Neira
Headers show
Series [iptables,1/7] tests: iptables-test: Fix missing chain case | expand

Commit Message

Phil Sutter Sept. 6, 2021, 4:30 p.m. UTC
If any test fails, return a non-zero exit code.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 iptables/tests/shell/run-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/iptables/tests/shell/run-tests.sh b/iptables/tests/shell/run-tests.sh
index 65c37adb75f2a..7878760fdcc4d 100755
--- a/iptables/tests/shell/run-tests.sh
+++ b/iptables/tests/shell/run-tests.sh
@@ -195,4 +195,4 @@  failed=$((legacy_fail+failed))
 
 msg_info "combined results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))"
 
-exit 0
+exit -$failed