]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: fix return codes
authorArturo Borrero Gonzalez <arturo@netfilter.org>
Wed, 28 Nov 2018 13:31:57 +0000 (14:31 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 28 Nov 2018 13:56:49 +0000 (14:56 +0100)
Try to return != 0 if a testsuite fails.

Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/build/run-tests.sh
tests/monitor/run-tests.sh
tests/shell/run-tests.sh

index 626f6fd1577efeefab5e650c2fd17410cc1c9f0a..b0560da613984de9d5746ea653d1aebc289f3463 100755 (executable)
@@ -52,4 +52,4 @@ done
 rm -rf $tmpdir
 
 echo "results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))"
-exit 0
+exit $failed
index f4089887b69aa28906544646e078ecad7e96b9ea..0478cf60c0dfedc020e45619c7dba1a1f83f0a20 100755 (executable)
@@ -17,7 +17,7 @@ fi
 testdir=$(mktemp -d)
 if [ ! -d $testdir ]; then
        echo "Failed to create test directory" >&2
-       exit 0
+       exit 1
 fi
 trap "rm -rf $testdir; $nft flush ruleset" EXIT
 
index 5b0ec41c6db59f81c146a20477c2438948066bea..fdca5fb39431fe1177ae6547a71b11a2b37a2ce8 100755 (executable)
@@ -152,4 +152,4 @@ echo ""
 msg_info "results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))"
 
 kernel_cleanup
-exit 0
+exit $failed