selftests: net: a few pmtu.sh fixes
Subsystems (3)
Paolo Abeni
maintainercover selftests: net: a few pmtu.sh fixes
This series try to address CI failures for the pmtu.sh tests. It does _not_ attempt to enable all the currently skipped cases, to avoid adding more entropy.
Tested with:
make -C tools/testing/selftests/ TARGETS=net install vng --build --config tools/testing/selftests/net/config
vng --run . --user root -- \ ./tools/testing/selftests/kselftest_install/run_kselftest.sh \ -t net:pmtu.sh
Paolo Abeni (3):
selftests: net: add missing config for pmtu.sh tests
selftests: net: fix available tunnels detection
selftests: net: don't access /dev/stdout in pmtu.sh
tools/testing/selftests/net/config | 3 +++ tools/testing/selftests/net/pmtu.sh | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-)
Signature · 1 line
2.43.0
Paolo Abeni
maintainerPATCH 1/3 selftests: net: add missing config for pmtu.sh tests
The mentioned test uses a few Kconfig still missing the net config, add them.
Before:
# Error: Specified qdisc kind is unknown.
# Error: Specified qdisc kind is unknown.
# Error: Qdisc not classful.
# We have an error talking to the kernel
# Error: Qdisc not classful.
# We have an error talking to the kernel
# policy_routing not supported
# TEST: ICMPv4 with DSCP and ECN: PMTU exceptions [SKIP]
After:
# TEST: ICMPv4 with DSCP and ECN: PMTU exceptions [ OK ]
--- tools/testing/selftests/net/config | 3 +++ 1 file changed, 3 insertions(+)
tools/testing/selftests/net/config +3 -0
@@ -60,6 +60,7 @@ CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_FQ=m CONFIG_NET_SCH_ETF=m CONFIG_NET_SCH_NETEM=y +CONFIG_NET_SCH_PRIO=m CONFIG_NFT_COMPAT=m CONFIG_NF_FLOW_TABLE=m CONFIG_PSAMPLE=m
@@ -77,6 +78,8 @@ CONFIG_NET_SCH_INGRESS=m CONFIG_NET_CLS_FLOWER=m CONFIG_NET_ACT_TUNNEL_KEY=m CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_CSUM=m CONFIG_BAREUDP=m CONFIG_IPV6_IOAM6_LWTUNNEL=y CONFIG_CRYPTO_SM4_GENERIC=y
Signature · 1 line
2.43.0
Re: [PATCH net 1/3] selftests: net: add missing config for pmtu.sh tests
Quoted 13 lines · Paolo Abeni
The mentioned test uses a few
Kconfigstill missing the net config, add them.Before:
# Error: Specified qdisc kind is unknown.
# Error: Specified qdisc kind is unknown.
# Error: Qdisc not classful.
# We have an error talking to the kernel
# Error: Qdisc not classful.
# We have an error talking to the kernel
#policy_routingnot supported
# TEST: ICMPv4 with DSCP and ECN: PMTU exceptions [SKIP]
Quoted 3 lines
After:
# TEST: ICMPv4 with DSCP and ECN: PMTU exceptions [ OK ]
Paolo Abeni
maintainerPATCH 2/3 selftests: net: fix available tunnels detection
In reply to Paolo AbeniThe pmtu.sh test tries to detect the tunnel protocols available in the running kernel and properly skip the unsupported cases.
In a few more complex setup, such detection is unsuccessful, as the script currently ignores some intermediate error code at setup time.
Before:
# which: no nettest in (/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin)
# TEST: vti6: PMTU exceptions (ESP-in-UDP) [FAIL]
# PMTU exception wasn't created after creating tunnel exceeding link layer MTU
# ./pmtu.sh: line 931: kill: (7543) - No such process
# ./pmtu.sh: line 931: kill: (7544) - No such process
After:
# xfrm4 not supported
# TEST: vti4: PMTU exceptions [SKIP]
--- tools/testing/selftests/net/pmtu.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
tools/testing/selftests/net/pmtu.sh +8 -8
@@ -707,23 +707,23 @@ setup_xfrm6() { } setup_xfrm4udp() { - setup_xfrm 4 ${veth4_a_addr} ${veth4_b_addr} "encap espinudp 4500 4500 0.0.0.0" - setup_nettest_xfrm 4 4500 + setup_xfrm 4 ${veth4_a_addr} ${veth4_b_addr} "encap espinudp 4500 4500 0.0.0.0" && \ + setup_nettest_xfrm 4 4500 } setup_xfrm6udp() { - setup_xfrm 6 ${veth6_a_addr} ${veth6_b_addr} "encap espinudp 4500 4500 0.0.0.0" - setup_nettest_xfrm 6 4500 + setup_xfrm 6 ${veth6_a_addr} ${veth6_b_addr} "encap espinudp 4500 4500 0.0.0.0" && \ + setup_nettest_xfrm 6 4500 } setup_xfrm4udprouted() { - setup_xfrm 4 ${prefix4}.${a_r1}.1 ${prefix4}.${b_r1}.1 "encap espinudp 4500 4500 0.0.0.0" - setup_nettest_xfrm 4 4500 + setup_xfrm 4 ${prefix4}.${a_r1}.1 ${prefix4}.${b_r1}.1 "encap espinudp 4500 4500 0.0.0.0" && \ + setup_nettest_xfrm 4 4500 } setup_xfrm6udprouted() { - setup_xfrm 6 ${prefix6}:${a_r1}::1 ${prefix6}:${b_r1}::1 "encap espinudp 4500 4500 0.0.0.0" - setup_nettest_xfrm 6 4500 + setup_xfrm 6 ${prefix6}:${a_r1}::1 ${prefix6}:${b_r1}::1 "encap espinudp 4500 4500 0.0.0.0" && \ + setup_nettest_xfrm 6 4500 } setup_routing_old() {
Signature · 1 line
2.43.0
Re: [PATCH net 2/3] selftests: net: fix available tunnels detection
Quoted 14 lines · Paolo Abeni
The
pmtu.shtest tries to detect the tunnel protocols available in the running kernel and properly skip the unsupported cases.In a few more complex setup, such detection is unsuccessful, as the script currently ignores some intermediate error code at setup time.
Before:
# which: no nettest in (/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin)
# TEST: vti6: PMTU exceptions (ESP-in-UDP) [FAIL]
# PMTU exception wasn't created after creating tunnel exceeding link layer MTU
# ./pmtu.sh: line 931: kill: (7543) - No such process
# ./pmtu.sh: line 931: kill: (7544) - No such process
Quoted 4 lines
After:
# xfrm4 not supported
# TEST: vti4: PMTU exceptions [SKIP]
Paolo Abeni
maintainerPATCH 3/3 selftests: net: don't access /dev/stdout in pmtu.sh
In reply to Paolo AbeniWhen running the pmtu.sh via the kselftest infra, accessing /dev/stdout gives unexpected results:
# dd: failed to open '/dev/stdout': Device or resource busy
# TEST: IPv4, bridged vxlan4: PMTU exceptions [FAIL]
Let dd use directly the standard output to fix the above:
# TEST: IPv4, bridged vxlan4: PMTU exceptions - nexthop objects [ OK ]
--- tools/testing/selftests/net/pmtu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/pmtu.sh +1 -1
@@ -1339,7 +1339,7 @@ test_pmtu_ipvX_over_bridged_vxlanY_or_geneveY_exception() { sleep 1 - dd if=/dev/zero of=/dev/stdout status=none bs=1M count=1 | ${target} socat -T 3 -u STDIN $TCPDST,connect-timeout=3 + dd if=/dev/zero status=none bs=1M count=1 | ${target} socat -T 3 -u STDIN $TCPDST,connect-timeout=3 size=$(du -sb $tmpoutfile) size=${size%%/tmp/*}
Signature · 1 line
2.43.0
Re: [PATCH net 3/3] selftests: net: don't access /dev/stdout in pmtu.sh
Quoted 8 lines · Paolo Abeni
When running the
pmtu.shvia the kselftest infra, accessing/dev/stdoutgives unexpected results:
# dd: failed to open '/dev/stdout': Device or resource busy
# TEST: IPv4, bridged vxlan4: PMTU exceptions [FAIL]Let dd use directly the standard output to fix the above:
# TEST: IPv4, bridged vxlan4: PMTU exceptions - nexthop objects [ OK ]
Quoted 12 lines · Paolo Abeni
This series try to address CI failures for the
pmtu.shtests. It does _not_ attempt to enable all the currently skipped cases, to avoid adding more entropy.Tested with:
make -C
tools/testing/selftests/TARGETS=net install vng --build --configtools/testing/selftests/net/configvng --run . --user root -- \ ./tools/testing/selftests/kselftest_install/run_kselftest.sh \ -t net:pmtu.sh
Quoted 9 lines
Paolo Abeni (3):
selftests: net: add missing config forpmtu.shtests
selftests: net: fix available tunnels detection
selftests: net: don't access/dev/stdoutinpmtu.shtools/testing/selftests/net/config | 3 +++ tools/testing/selftests/net/pmtu.sh | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-)
selftests are getting a lot of love right now :-)
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Tue, 30 Jan 2024 18:47:15 +0100 you wrote:
This series try to address CI failures for the
pmtu.shtests. It does _not_ attempt to enable all the currently skipped cases, to avoid adding more entropy.Tested with:
Quoted 7 lines
make -C
tools/testing/selftests/TARGETS=net install vng --build --configtools/testing/selftests/net/configvng --run . --user root -- \ ./tools/testing/selftests/kselftest_install/run_kselftest.sh \ -t net:pmtu.sh[...]
Here is the summary with links:
- [net,1/3] selftests: net: add missing config for pmtu.sh tests
https://git.kernel.org/netdev/net/c/f7c25d8e17dd - [net,2/3] selftests: net: fix available tunnels detection https://git.kernel.org/netdev/net/c/e4e4b6d568d2 - [net,3/3] selftests: net: don't access /dev/stdout in pmtu.sh https://git.kernel.org/netdev/net/c/bc0970d5ac1d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html