summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/mptcp/mptcp_join.sh
diff options
context:
space:
mode:
authorGeliang Tang <tanggeliang@kylinos.cn>2024-03-06 10:42:54 +0100
committerJakub Kicinski <kuba@kernel.org>2024-03-07 21:06:52 -0800
commitdf8d3ba55b4fa1d6aed8449971ee50757cb0732f (patch)
tree8c1c12c4a094f91308c3bf845182ab4f32c8fc7e /tools/testing/selftests/net/mptcp/mptcp_join.sh
parent3a0f9bed3c28811d692f59b2db35e6c3e259ab43 (diff)
downloadlinux-stable-df8d3ba55b4fa1d6aed8449971ee50757cb0732f.tar.gz
linux-stable-df8d3ba55b4fa1d6aed8449971ee50757cb0732f.tar.bz2
linux-stable-df8d3ba55b4fa1d6aed8449971ee50757cb0732f.zip
selftests: mptcp: more operations in ns_init/exit
Set more the default sysctl values in mptcp_lib_ns_init(). It is fine to do that everywhere, because they could be overridden latter if needed. mptcp_lib_ns_exit() now also try to remove temp netns files used for the stats even for selftests not using them. That's fine to do that because these files have a unique name. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://lore.kernel.org/r/20240306-upstream-net-next-20240304-selftests-mptcp-shared-code-shellcheck-v2-5-bc79e6e5e6a0@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/mptcp/mptcp_join.sh')
-rwxr-xr-xtools/testing/selftests/net/mptcp/mptcp_join.sh7
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 612470244c58..2d9cf6f3bbf3 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -90,10 +90,7 @@ init_partial()
local netns
for netns in "$ns1" "$ns2"; do
- ip netns exec $netns sysctl -q net.mptcp.enabled=1
ip netns exec $netns sysctl -q net.mptcp.pm_type=0 2>/dev/null || true
- ip netns exec $netns sysctl -q net.ipv4.conf.all.rp_filter=0
- ip netns exec $netns sysctl -q net.ipv4.conf.default.rp_filter=0
if $checksum; then
ip netns exec $netns sysctl -q net.mptcp.checksum_enabled=1
fi
@@ -138,10 +135,6 @@ cleanup_partial()
{
rm -f "$capout"
- local netns
- for netns in "$ns1" "$ns2"; do
- rm -f /tmp/$netns.{nstat,out}
- done
mptcp_lib_ns_exit "${ns1}" "${ns2}"
}