]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests: fib_tests: sleep after changing carrier
authorDavid Ahern <dsahern@gmail.com>
Tue, 13 Feb 2018 16:37:36 +0000 (08:37 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Feb 2018 19:34:28 +0000 (14:34 -0500)
sleep for a second after setting carrier down to allow linkwatch
to propagate the change to the routing stack via netdev_state_change.
As it stands there is a race setting carrier down on the dummy
device and then checking the linkdown flag in the routes.

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

index e113cfd659fc0569da7c4094e810d9bb5416cd13..b617985ecdc10323136c54272b4398be95305948 100755 (executable)
@@ -282,6 +282,7 @@ fib_carrier_local_test()
 
        set -e
        ip -netns testns link set dev dummy0 carrier off
+       sleep 1
        set +e
 
        echo "    Carrier off on nexthop"