Skip to content

Commit

Permalink
selftests: fib_tests: sleep after changing carrier. again.
Browse files Browse the repository at this point in the history
[ Upstream commit af548a2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and gregkh committed Mar 23, 2019
1 parent 8cd89bf commit d3f62d3
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 @@ -385,6 +385,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 d3f62d3

Please sign in to comment.