All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-22 10:27 ` Thadeu Lima de Souza Cascardo
  0 siblings, 0 replies; 9+ messages in thread
From: cascardo @ 2019-02-22 10:27 UTC (permalink / raw)


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(+)

diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 802b4af18729..1080ff55a788 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -388,6 +388,7 @@ fib_carrier_unicast_test()
 
 	set -e
 	$IP link set dev dummy0 carrier off
+	sleep 1
 	set +e
 
 	echo "    Carrier down"
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-22 10:27 ` Thadeu Lima de Souza Cascardo
  0 siblings, 0 replies; 9+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2019-02-22 10:27 UTC (permalink / raw)


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(+)

diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 802b4af18729..1080ff55a788 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -388,6 +388,7 @@ fib_carrier_unicast_test()
 
 	set -e
 	$IP link set dev dummy0 carrier off
+	sleep 1
 	set +e
 
 	echo "    Carrier down"
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-22 10:27 ` Thadeu Lima de Souza Cascardo
  0 siblings, 0 replies; 9+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2019-02-22 10:27 UTC (permalink / raw)
  To: netdev; +Cc: linux-kselftest, Thadeu Lima de Souza Cascardo, David Ahern

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@gmail.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
---
 tools/testing/selftests/net/fib_tests.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 802b4af18729..1080ff55a788 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -388,6 +388,7 @@ fib_carrier_unicast_test()
 
 	set -e
 	$IP link set dev dummy0 carrier off
+	sleep 1
 	set +e
 
 	echo "    Carrier down"
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-22 22:37   ` David Ahern
  0 siblings, 0 replies; 9+ messages in thread
From: dsahern @ 2019-02-22 22:37 UTC (permalink / raw)


On 2/22/19 5:27 AM, Thadeu Lima de Souza Cascardo wrote:
> 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(+)
> 

Reviewed-by: David Ahern <dsahern at gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-22 22:37   ` David Ahern
  0 siblings, 0 replies; 9+ messages in thread
From: David Ahern @ 2019-02-22 22:37 UTC (permalink / raw)


On 2/22/19 5:27 AM, Thadeu Lima de Souza Cascardo wrote:
> 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(+)
> 

Reviewed-by: David Ahern <dsahern at gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-22 22:37   ` David Ahern
  0 siblings, 0 replies; 9+ messages in thread
From: David Ahern @ 2019-02-22 22:37 UTC (permalink / raw)
  To: Thadeu Lima de Souza Cascardo, netdev; +Cc: linux-kselftest, David Ahern

On 2/22/19 5:27 AM, Thadeu Lima de Souza Cascardo wrote:
> 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@gmail.com>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> ---
>  tools/testing/selftests/net/fib_tests.sh | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: David Ahern <dsahern@gmail.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-24  2:34   ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: davem @ 2019-02-24  2:34 UTC (permalink / raw)


From: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
Date: Fri, 22 Feb 2019 07:27:41 -0300

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-24  2:34   ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2019-02-24  2:34 UTC (permalink / raw)


From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Date: Fri, 22 Feb 2019 07:27:41 -0300

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] selftests: fib_tests: sleep after changing carrier. again.
@ 2019-02-24  2:34   ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2019-02-24  2:34 UTC (permalink / raw)
  To: cascardo; +Cc: netdev, linux-kselftest, dsahern

From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Date: Fri, 22 Feb 2019 07:27:41 -0300

> 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@gmail.com>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-02-24  2:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22 10:27 [PATCH] selftests: fib_tests: sleep after changing carrier. again cascardo
2019-02-22 10:27 ` Thadeu Lima de Souza Cascardo
2019-02-22 10:27 ` Thadeu Lima de Souza Cascardo
2019-02-22 22:37 ` dsahern
2019-02-22 22:37   ` David Ahern
2019-02-22 22:37   ` David Ahern
2019-02-24  2:34 ` davem
2019-02-24  2:34   ` David Miller
2019-02-24  2:34   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.