Skip to content

Commit

Permalink
selftests: fib_tests: sleep after changing carrier. again.
Browse files Browse the repository at this point in the history
Just like commit e2ba732 ("selftests: fib_tests: sleep after
changing carrier"), wait one second to allow linkwatch to propagate the
carrier change to the stack.

There are two sets of carrier tests. The first slept after the carrier
was set to off, and when the second set ran, it was likely that the
linkwatch would be able to run again without much delay, reducing the
likelihood of a race. However, if you run 'fib_tests.sh -t carrier' on a
loop, you will quickly notice the failures.

Sleeping on the second set of tests make the failures go away.

Cc: David Ahern <dsahern@gmail.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and David S. Miller committed Feb 24, 2019
1 parent 4593403 commit af548a2
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 @@ -388,6 +388,7 @@ fib_carrier_unicast_test()

set -e
$IP link set dev dummy0 carrier off
sleep 1
set +e

echo " Carrier down"
Expand Down

0 comments on commit af548a2

Please sign in to comment.