netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] selftests/net: force synchronized GC for a test.
@ 2024-02-23  8:13 Kui-Feng Lee
  2024-02-24  2:21 ` Jakub Kicinski
  0 siblings, 1 reply; 13+ messages in thread
From: Kui-Feng Lee @ 2024-02-23  8:13 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] 13+ messages in thread

end of thread, other threads:[~2024-03-05  3:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23  8:13 [PATCH net-next] selftests/net: force synchronized GC for a test Kui-Feng Lee
2024-02-24  2:21 ` Jakub Kicinski
2024-02-24  3:15   ` David Ahern
2024-02-24  3:54     ` Kui-Feng Lee
2024-02-29 17:39     ` Kui-Feng Lee
2024-03-02  0:45       ` Kui-Feng Lee
2024-03-04 15:44         ` Jakub Kicinski
2024-03-04 17:27           ` Kui-Feng Lee
2024-03-05  2:41           ` David Ahern
2024-03-05  2:49             ` David Ahern
2024-03-05  3:20               ` Kui-Feng Lee
2024-02-24  4:40   ` Kui-Feng Lee
2024-02-27  8:53     ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).