diff mbox series

[net-next] selftests/net: ensure mptcp is enabled in netns

Message ID 20250224094013.13159-1-liuhangbin@gmail.com (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series [net-next] selftests/net: ensure mptcp is enabled in netns | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success Errors and warnings before: 26 (+1) this patch: 26 (+1)
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success net selftest script(s) already in Makefile
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: Misplaced SPDX-License-Identifier tag - use line 1 instead
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2025-02-24--12-00 (tests: 895)

Commit Message

Hangbin Liu Feb. 24, 2025, 9:40 a.m. UTC
Some distributions may not enable MPTCP by default. All other MPTCP tests
source mptcp_lib.sh to ensure MPTCP is enabled before testing. However,
the ip_local_port_range test is the only one that does not include this
step.

Let's also ensure MPTCP is enabled in netns for ip_local_port_range so
that it passes on all distributions.

Suggested-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 tools/testing/selftests/net/ip_local_port_range.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Matthieu Baerts Feb. 24, 2025, 1:53 p.m. UTC | #1
Hi Hangbin, Davide,

On 24/02/2025 10:40, Hangbin Liu wrote:
> Some distributions may not enable MPTCP by default. All other MPTCP tests
> source mptcp_lib.sh to ensure MPTCP is enabled before testing. However,
> the ip_local_port_range test is the only one that does not include this
> step.

This modification is OK for me, but would it not be time to stop
patching the kernel of these distributions to disable MPTCP by default?

As far as I know, only one Linux distribution is doing that, and that's
the one supporting MPTCP the best :)
It was making sense when MPTCP was backported to older kernels, but now
that v6.12 is used as a new base, it probably no longer makes sense, no?

> Let's also ensure MPTCP is enabled in netns for ip_local_port_range so
> that it passes on all distributions.

Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Cheers,
Matt
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/ip_local_port_range.sh b/tools/testing/selftests/net/ip_local_port_range.sh
index 6c6ad346eaa0..4ff746db1256 100755
--- a/tools/testing/selftests/net/ip_local_port_range.sh
+++ b/tools/testing/selftests/net/ip_local_port_range.sh
@@ -2,4 +2,6 @@ 
 # SPDX-License-Identifier: GPL-2.0
 
 ./in_netns.sh \
-  sh -c 'sysctl -q -w net.ipv4.ip_local_port_range="40000 49999" && ./ip_local_port_range'
+  sh -c 'sysctl -q -w net.mptcp.enabled=1 && \
+         sysctl -q -w net.ipv4.ip_local_port_range="40000 49999" && \
+         ./ip_local_port_range'