diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2019-04-30 10:46:10 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-05 14:42:39 +0200 |
commit | 7a42cf4dfa43af6b1fc4a18c6ad41891e59bb1ed (patch) | |
tree | 8af522119265096f99371cce80fa5822c0b71861 /tools/testing | |
parent | b563e9bbabfeddf6d4da3b99e27b337778083018 (diff) | |
download | linux-stable-7a42cf4dfa43af6b1fc4a18c6ad41891e59bb1ed.tar.gz linux-stable-7a42cf4dfa43af6b1fc4a18c6ad41891e59bb1ed.tar.bz2 linux-stable-7a42cf4dfa43af6b1fc4a18c6ad41891e59bb1ed.zip |
selftests: fib_rule_tests: print the result and return 1 if any tests failed
[ Upstream commit f68d7c44e76532e46f292ad941aa3706cb9e6e40 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-x | tools/testing/selftests/net/fib_rule_tests.sh | 6 |
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 d4cfb6a7a086..d84193bdc307 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 |