Netdev List
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/net: force synchronized GC for a test.
@ 2024-02-23  7:52 Kui-Feng Lee
  2024-02-23  8:10 ` Kui-Feng Lee
  0 siblings, 1 reply; 2+ messages in thread
From: Kui-Feng Lee @ 2024-02-23  7:52 UTC (permalink / raw)
  To: netdev, ast, martin.lau, kernel-team, kuba, davem, dsahern
  Cc: sinquersw, kuifeng, Kui-Feng Lee

Due to the slowness of the test environment, always set off a synchronized
GC after waiting for GC. This can fix the problem that Fib6 garbage
collection test fails occasionally.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
---
 tools/testing/selftests/net/fib_tests.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 3ec1050e47a2..0a82c9bc07bb 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -823,7 +823,9 @@ fib6_gc_test()
 	    $IP -6 route add 2001:20::$i \
 		via 2001:10::2 dev dummy_10 expires $EXPIRE
 	done
+	# Wait for GC
 	sleep $(($EXPIRE * 2 + 1))
+	$NS_EXEC sysctl -wq net.ipv6.route.flush=1
 	check_rt_num 0 $($IP -6 route list |grep expires|wc -l)
 	log_test $ret 0 "ipv6 route garbage collection (with permanent routes)"
 
@@ -864,7 +866,7 @@ fib6_gc_test()
 
 	# Wait for GC
 	sleep $(($EXPIRE * 2 + 1))
-
+	$NS_EXEC sysctl -wq net.ipv6.route.flush=1
 	check_rt_num 5 $($IP -6 route list |grep -v expires|grep 2001:20::|wc -l)
 	log_test $ret 0 "ipv6 route garbage collection (replace with permanent)"
 
-- 
2.34.1


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

* Re: [PATCH bpf-next] selftests/net: force synchronized GC for a test.
  2024-02-23  7:52 [PATCH bpf-next] selftests/net: force synchronized GC for a test Kui-Feng Lee
@ 2024-02-23  8:10 ` Kui-Feng Lee
  0 siblings, 0 replies; 2+ messages in thread
From: Kui-Feng Lee @ 2024-02-23  8:10 UTC (permalink / raw)
  To: Kui-Feng Lee, netdev, ast, martin.lau, kernel-team, kuba, davem,
	dsahern
  Cc: kuifeng

Sorry! Post the patch to a wrong list.

On 2/22/24 23:52, Kui-Feng Lee wrote:
> Due to the slowness of the test environment, always set off a synchronized
> GC after waiting for GC. This can fix the problem that Fib6 garbage
> collection test fails occasionally.
> 
> Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
> ---
>   tools/testing/selftests/net/fib_tests.sh | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
> index 3ec1050e47a2..0a82c9bc07bb 100755
> --- a/tools/testing/selftests/net/fib_tests.sh
> +++ b/tools/testing/selftests/net/fib_tests.sh
> @@ -823,7 +823,9 @@ fib6_gc_test()
>   	    $IP -6 route add 2001:20::$i \
>   		via 2001:10::2 dev dummy_10 expires $EXPIRE
>   	done
> +	# Wait for GC
>   	sleep $(($EXPIRE * 2 + 1))
> +	$NS_EXEC sysctl -wq net.ipv6.route.flush=1
>   	check_rt_num 0 $($IP -6 route list |grep expires|wc -l)
>   	log_test $ret 0 "ipv6 route garbage collection (with permanent routes)"
>   
> @@ -864,7 +866,7 @@ fib6_gc_test()
>   
>   	# Wait for GC
>   	sleep $(($EXPIRE * 2 + 1))
> -
> +	$NS_EXEC sysctl -wq net.ipv6.route.flush=1
>   	check_rt_num 5 $($IP -6 route list |grep -v expires|grep 2001:20::|wc -l)
>   	log_test $ret 0 "ipv6 route garbage collection (replace with permanent)"
>   

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

end of thread, other threads:[~2024-02-23  8:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23  7:52 [PATCH bpf-next] selftests/net: force synchronized GC for a test Kui-Feng Lee
2024-02-23  8:10 ` Kui-Feng Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox