aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-05-21 10:26:54 -0700
committerDavid S. Miller <davem@davemloft.net>2018-05-22 14:44:18 -0400
commit37ce42c14edad0d979444d8a589ae2299edb464d (patch)
tree7b5d2c5e8f9db831cb9e82ef0604a843bf77f9db /tools
parentnet/ipv6: Simplify route replace and appending into multipath route (diff)
downloadwireguard-linux-37ce42c14edad0d979444d8a589ae2299edb464d.tar.xz
wireguard-linux-37ce42c14edad0d979444d8a589ae2299edb464d.zip
selftests: fib_tests: Add success-fail counts
As more tests are added, it is convenient to have a tally at the end. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/net/fib_tests.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 9164e60d4b66..7e2291161e15 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -18,8 +18,10 @@ log_test()
if [ ${rc} -eq ${expected} ]; then
printf " TEST: %-60s [ OK ]\n" "${msg}"
+ nsuccess=$((nsuccess+1))
else
ret=1
+ nfail=$((nfail+1))
printf " TEST: %-60s [FAIL]\n" "${msg}"
if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
echo
@@ -598,4 +600,9 @@ cleanup &> /dev/null
fib_test
+if [ "$TESTS" != "none" ]; then
+ printf "\nTests passed: %3d\n" ${nsuccess}
+ printf "Tests failed: %3d\n" ${nfail}
+fi
+
exit $ret