selftests/net: force synchronized GC for a test.
Subsystems (4)
PATCH 1/1 selftests/net: force synchronized GC for a test.
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 <[email protected]>
--- tools/testing/selftests/net/fib_tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tools/testing/selftests/net/fib_tests.sh +3 -1
@@ -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)"
Signature · 1 line
2.34.1
Sorry! Post the patch to a wrong list.
Quoted 32 lines · 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 <[email protected]>--- tools/testing/selftests/net/fib_tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tools/testing/selftests/net/fib_tests.sh +3
-1@@ -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)"