selftests/net: fix waiting time for ipv6_gc test in fib_tests.sh.
authorKui-Feng Lee <thinker.li@gmail.com>
Tue, 5 Mar 2024 18:39:49 +0000 (10:39 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Mar 2024 04:47:59 +0000 (20:47 -0800)
commit4af9a0bee116e927a88da903a9244bb7d03483e3
tree556185b3fd30e6e96938e09f6ede3201e3129d42
parent8edbd3960150ee7dd7a2857bd9a5cf14906facc2
selftests/net: fix waiting time for ipv6_gc test in fib_tests.sh.

ipv6_gc fails occasionally. According to the study, fib6_run_gc() using
jiffies_round() to round the GC interval could increase the waiting time up
to 750ms (3/4 seconds). The timer has a granularity of 512ms at the range
4s to 32s. That means a route with an expiration time E seconds can wait
for more than E * 2 + 1 seconds if the GC interval is also E seconds.

E * 2 + 2 seconds should be enough for waiting for removing routes.

Also remove a check immediately after replacing 5 routes since it is very
likely to remove some of routes before completing the last route with a
slow environment.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240305183949.258473-1-thinker.li@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/fib_tests.sh