summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/fib_rule_tests.sh
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2019-04-30 05:46:10 +0300
committerDavid S. Miller <davem@davemloft.net>2019-05-01 21:30:23 +0300
commitf68d7c44e76532e46f292ad941aa3706cb9e6e40 (patch)
treef525f659b5d91197ec8b852e3112d5f613424903 /tools/testing/selftests/net/fib_rule_tests.sh
parentd2f0c961148f65bc73eda72b9fa3a4e80973cb49 (diff)
downloadlinux-f68d7c44e76532e46f292ad941aa3706cb9e6e40.tar.xz
selftests: fib_rule_tests: print the result and return 1 if any tests failed
Fixes: 65b2b4939a64 ("selftests: net: initial fib rule tests") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/fib_rule_tests.sh')
-rwxr-xr-xtools/testing/selftests/net/fib_rule_tests.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/fib_rule_tests.sh b/tools/testing/selftests/net/fib_rule_tests.sh
index 5b92c1f4dc04..4b7e107865bf 100755
--- a/tools/testing/selftests/net/fib_rule_tests.sh
+++ b/tools/testing/selftests/net/fib_rule_tests.sh
@@ -27,6 +27,7 @@ log_test()
nsuccess=$((nsuccess+1))
printf "\n TEST: %-50s [ OK ]\n" "${msg}"
else
+ ret=1
nfail=$((nfail+1))
printf "\n TEST: %-50s [FAIL]\n" "${msg}"
if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
@@ -245,4 +246,9 @@ setup
run_fibrule_tests
cleanup
+if [ "$TESTS" != "none" ]; then
+ printf "\nTests passed: %3d\n" ${nsuccess}
+ printf "Tests failed: %3d\n" ${nfail}
+fi
+
exit $ret