selftests: fib_tests: sleep after changing carrier. again.
authorThadeu Lima de Souza Cascardo <>
Fri, 22 Feb 2019 10:27:41 +0000 (07:27 -0300)
committerDavid S. Miller <>
Sun, 24 Feb 2019 02:34:20 +0000 (18:34 -0800)
Just like commit e2ba732a1681 ("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 ' -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 <>
Signed-off-by: Thadeu Lima de Souza Cascardo <>
Reviewed-by: David Ahern <>
Signed-off-by: David S. Miller <>

index 802b4af187297a7c8f2ddf1e086877b35cd41687..1080ff55a788f720f240271741fbc38680061b7a 100755 (executable)
@@ -388,6 +388,7 @@ fib_carrier_unicast_test()
        set -e
        $IP link set dev dummy0 carrier off
+       sleep 1
        set +e
        echo "    Carrier down"