Skip to contentSkip to conversation

selftests: fib_tests: sleep after changing carrier. again.

PATCH Applied Thadeu Lima de Souza Cascardo 3 participants 3 messages Feb 22, 2019 – Feb 24, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: fib_tests: sleep after changing carrier. again.

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 '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 at gmail.com>
Signed-off-by Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
---
 tools/testing/selftests/net/fib_tests.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/net/fib_tests.sh +1 -0
index 802b4af18729..1080ff55a788 100755
@@ -388,6 +388,7 @@ fib_carrier_unicast_test()
 
 	set -e
 	$IP link set dev dummy0 carrier off
+	sleep 1
 	set +e
 
 	echo "    Carrier down"
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Thadeu Lima de Souza Cascardo

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 'fib_tests.sh -t carrier' on a loop, you will quickly notice the failures.

Quoted 8 lines

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

Cc David Ahern <dsahern at gmail.com>
Signed-off-by Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
---
 tools/testing/selftests/net/fib_tests.sh | 1 +
 1 file changed, 1 insertion(+)
Reviewed-by David Ahern <dsahern at gmail.com>
maintainer Applied
#2 lore raw
In reply to Thadeu Lima de Souza Cascardo

From: Thadeu Lima de Souza Cascardo <[email protected]>
Date: Fri, 22 Feb 2019 07:27:41 -0300

Quoted 10 lines

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 'fib_tests.sh -t carrier' on a loop, you will quickly notice the failures.

Quoted 4 lines

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

Cc David Ahern <dsahern at gmail.com>
Signed-off-by Thadeu Lima de Souza Cascardo <cascardo at canonical.com>

Applied, thanks.