]>
Commit | Line | Data |
---|---|---|
36e3f504 SL |
1 | From d565df12cb814befd29467fa09d31a0bea80085e Mon Sep 17 00:00:00 2001 |
2 | From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> | |
3 | Date: Fri, 22 Feb 2019 07:27:41 -0300 | |
4 | Subject: selftests: fib_tests: sleep after changing carrier. again. | |
5 | ||
6 | [ Upstream commit af548a27b158d548d41e56255e6eaca1658cc3be ] | |
7 | ||
8 | Just like commit e2ba732a1681 ("selftests: fib_tests: sleep after | |
9 | changing carrier"), wait one second to allow linkwatch to propagate the | |
10 | carrier change to the stack. | |
11 | ||
12 | There are two sets of carrier tests. The first slept after the carrier | |
13 | was set to off, and when the second set ran, it was likely that the | |
14 | linkwatch would be able to run again without much delay, reducing the | |
15 | likelihood of a race. However, if you run 'fib_tests.sh -t carrier' on a | |
16 | loop, you will quickly notice the failures. | |
17 | ||
18 | Sleeping on the second set of tests make the failures go away. | |
19 | ||
20 | Cc: David Ahern <dsahern@gmail.com> | |
21 | Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> | |
22 | Reviewed-by: David Ahern <dsahern@gmail.com> | |
23 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
24 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
25 | --- | |
26 | tools/testing/selftests/net/fib_tests.sh | 1 + | |
27 | 1 file changed, 1 insertion(+) | |
28 | ||
29 | diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh | |
30 | index 0f45633bd634..a4ccde0e473b 100755 | |
31 | --- a/tools/testing/selftests/net/fib_tests.sh | |
32 | +++ b/tools/testing/selftests/net/fib_tests.sh | |
33 | @@ -385,6 +385,7 @@ fib_carrier_unicast_test() | |
34 | ||
35 | set -e | |
36 | $IP link set dev dummy0 carrier off | |
37 | + sleep 1 | |
38 | set +e | |
39 | ||
40 | echo " Carrier down" | |
41 | -- | |
42 | 2.19.1 | |
43 |