Skip to content

Commit 4355a2f

Browse files
author
Hangbin Liu
committed
selftests: net: more pmtu.sh fixes
JIRA: https://issues.redhat.com/browse/RHEL-31077 Upstream Status: net.git commit 20622dc commit 20622dc Author: Paolo Abeni <pabeni@redhat.com> Date: Mon Feb 12 11:19:24 2024 +0100 selftests: net: more pmtu.sh fixes The netdev CI is reporting failures for the pmtu test: [ 115.929264] br0: port 2(vxlan_a) entered forwarding state # 2024/02/08 17:33:22 socat[7871] E bind(7, {AF=10 [0000:0000:0000:0000:0000:0000:0000:0000]:50000}, 28): Address already in use # 2024/02/08 17:33:22 socat[7877] E write(7, 0x5598fb6ff000, 8192): Connection refused # TEST: IPv6, bridged vxlan4: PMTU exceptions [FAIL] # File size 0 mismatches exepcted value in locally bridged vxlan test The root cause is apparently a socket created by a previous iteration of the relevant loop still lasting in LAST_ACK state. Note that even the file size check is racy, the receiver process dumping the file could still be running in background Allow the listener to bound on the same local port via SO_REUSEADDR and collect file output file size only after the listener completion. Fixes: 136a1b4 ("selftests: net: test vxlan pmtu exceptions with tcp") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Link: https://lore.kernel.org/r/4f51c11a1ce7ca7a4dabd926cffff63dadac9ba1.1707731086.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Hangbin Liu <haliu@redhat.com>
1 parent 878642d commit 4355a2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/net/pmtu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,16 +1344,16 @@ test_pmtu_ipvX_over_bridged_vxlanY_or_geneveY_exception() {
13441344
else
13451345
TCPDST="TCP:[${dst}]:50000"
13461346
fi
1347-
${ns_b} socat -T 3 -u -6 TCP-LISTEN:50000 STDOUT > $tmpoutfile &
1347+
${ns_b} socat -T 3 -u -6 TCP-LISTEN:50000,reuseaddr STDOUT > $tmpoutfile &
13481348
local socat_pid=$!
13491349

13501350
wait_local_port_listen ${NS_B} 50000 tcp
13511351

13521352
dd if=/dev/zero status=none bs=1M count=1 | ${target} socat -T 3 -u STDIN $TCPDST,connect-timeout=3
13531353

1354+
wait ${socat_pid}
13541355
size=$(du -sb $tmpoutfile)
13551356
size=${size%%/tmp/*}
1356-
wait ${socat_pid}
13571357

13581358
[ $size -ne 1048576 ] && err "File size $size mismatches exepcted value in locally bridged vxlan test" && return 1
13591359
done

0 commit comments

Comments
 (0)