]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
selftests: fib_rule_tests: print the result and return 1 if any tests failed
authorHangbin Liu <liuhangbin@gmail.com>
Tue, 30 Apr 2019 02:46:10 +0000 (10:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 18:30:23 +0000 (14:30 -0400)
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>
tools/testing/selftests/net/fib_rule_tests.sh

index 5b92c1f4dc0491169bc782a2a95ee11df2af819e..4b7e107865bf3cef0faebbb0dd82fe3a0eb8575d 100755 (executable)
@@ -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