mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
selftests: fib_rule_tests: print the result and return 1 if any tests failed
[ Upstream commitf68d7c44e7] Fixes:65b2b4939a("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b563e9bbab
commit
7a42cf4dfa
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user