selftests: fib_rule_tests: print the result and return 1 if any tests failed
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>
This commit is contained in:

committed by
David S. Miller

parent
d2f0c96114
commit
f68d7c44e7
@@ -27,6 +27,7 @@ log_test()
|
|||||||
nsuccess=$((nsuccess+1))
|
nsuccess=$((nsuccess+1))
|
||||||
printf "\n TEST: %-50s [ OK ]\n" "${msg}"
|
printf "\n TEST: %-50s [ OK ]\n" "${msg}"
|
||||||
else
|
else
|
||||||
|
ret=1
|
||||||
nfail=$((nfail+1))
|
nfail=$((nfail+1))
|
||||||
printf "\n TEST: %-50s [FAIL]\n" "${msg}"
|
printf "\n TEST: %-50s [FAIL]\n" "${msg}"
|
||||||
if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
|
if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
|
||||||
@@ -245,4 +246,9 @@ setup
|
|||||||
run_fibrule_tests
|
run_fibrule_tests
|
||||||
cleanup
|
cleanup
|
||||||
|
|
||||||
|
if [ "$TESTS" != "none" ]; then
|
||||||
|
printf "\nTests passed: %3d\n" ${nsuccess}
|
||||||
|
printf "Tests failed: %3d\n" ${nfail}
|
||||||
|
fi
|
||||||
|
|
||||||
exit $ret
|
exit $ret
|
||||||
|
Reference in New Issue
Block a user