selftests: fib_tests: Make test results more verbose
authorDavid Ahern <dsahern@gmail.com>
Tue, 13 Feb 2018 16:37:34 +0000 (08:37 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Feb 2018 19:34:28 +0000 (14:34 -0500)
commit1056691b26809e838da67bc2a61761017d20cfda
tree8bbe9043fce44de715483154a5cf7f7fa20117a4
parent07f4e62f1c704f583740e6dd59c223819feb03ec
selftests: fib_tests: Make test results more verbose

fib_tests.sh is failing in a VM:
    $ fib_tests.sh
    Running netdev unregister tests
    PASS: unicast route test
    PASS: multipath route test
    Running netdev down tests
    PASS: unicast route test
    PASS: multipath route test
    Running netdev carrier change tests
    PASS: local route carrier test
    FAIL: unicast route carrier test

The last test corresponds to fib_carrier_unicast_test which 12 places
that could be failing. Be more verbose in the output so a failure is
easier to track down and separate test setup failures with set -e and
set +e pairs.

With the verbose logging it is easier to see which checks are failing:
    $fib_tests.sh
    Single path route carrier test
        ....
        Carrier down
            IPv4 fibmatch                                         [ OK ]
            IPv6 fibmatch                                         [ OK ]
            IPv4 linkdown flag set                                [FAIL]
            IPv6 linkdown flag set                                [FAIL]
        Second address added with carrier down
            IPv4 fibmatch                                         [ OK ]
            IPv6 fibmatch                                         [ OK ]
            IPv4 linkdown flag set                                [FAIL]
            IPv6 linkdown flag set                                [ OK ]

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/fib_tests.sh