Commit af548a27 authored by Thadeu Lima de Souza Cascardo's avatar Thadeu Lima de Souza Cascardo Committed by David S. Miller

selftests: fib_tests: sleep after changing carrier. again.

Just like commit e2ba732a ("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: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4593403f
...@@ -388,6 +388,7 @@ fib_carrier_unicast_test() ...@@ -388,6 +388,7 @@ fib_carrier_unicast_test()
set -e set -e
$IP link set dev dummy0 carrier off $IP link set dev dummy0 carrier off
sleep 1
set +e set +e
echo " Carrier down" echo " Carrier down"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment