Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/net: reduce xfrm_policy test time

The check_random_order test add/get plenty of xfrm rules, which consume
a lot time on debug kernel and always TIMEOUT. Let's reduce the test
loop and see if it works.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240514095227.2597730-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Hangbin Liu and committed by
Jakub Kicinski
988af276 52d94c18

+2 -2
+2 -2
tools/testing/selftests/net/xfrm_policy.sh
··· 293 293 local ns=$1 294 294 local log=$2 295 295 296 - for i in $(seq 100); do 296 + for i in $(seq 50); do 297 297 ip -net $ns xfrm policy flush 298 298 for j in $(seq 0 16 255 | sort -R); do 299 299 ip -net $ns xfrm policy add dst $j.0.0.0/24 dir out priority 10 action allow ··· 306 306 done 307 307 done 308 308 309 - for i in $(seq 100); do 309 + for i in $(seq 50); do 310 310 ip -net $ns xfrm policy flush 311 311 for j in $(seq 0 16 255 | sort -R); do 312 312 local addr=$(printf "e000:0000:%02x00::/56" $j)