Skip to content

Commit

Permalink
selftests: fib_tests: sleep after changing carrier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Ahern authored and David S. Miller committed Feb 13, 2018
1 parent ee395a5 commit e2ba732
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/net/fib_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e2ba732

Please sign in to comment.