From: Hangbin Liu <liuhangbin@gmail.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
David Ahern <dsahern@kernel.org>,
linux-kselftest@vger.kernel.org,
Po-Hsu Lin <po-hsu.lin@canonical.com>,
Florian Westphal <fw@strlen.de>, Martin KaFai Lau <kafai@fb.com>,
Stefano Brivio <sbrivio@redhat.com>,
Kees Cook <keescook@chromium.org>,
Hangbin Liu <liuhangbin@gmail.com>
Subject: [PATCH net-next 4/8] selftests/net: convert stress_reuseport_listen.sh to run it in unique namespace
Date: Tue, 19 Dec 2023 17:48:52 +0800 [thread overview]
Message-ID: <20231219094856.1740079-5-liuhangbin@gmail.com> (raw)
In-Reply-To: <20231219094856.1740079-1-liuhangbin@gmail.com>
Here is the test result after conversion.
# ./stress_reuseport_listen.sh
listen 24000 socks took 0.47714
Acked-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
tools/testing/selftests/net/stress_reuseport_listen.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/net/stress_reuseport_listen.sh b/tools/testing/selftests/net/stress_reuseport_listen.sh
index 4de11da4092b..94d5d1a1c90f 100755
--- a/tools/testing/selftests/net/stress_reuseport_listen.sh
+++ b/tools/testing/selftests/net/stress_reuseport_listen.sh
@@ -2,18 +2,18 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022 Meta Platforms, Inc. and affiliates.
-NS='stress_reuseport_listen_ns'
+source lib.sh
NR_FILES=24100
SAVED_NR_FILES=$(ulimit -n)
setup() {
- ip netns add $NS
+ setup_ns NS
ip netns exec $NS sysctl -q -w net.ipv6.ip_nonlocal_bind=1
ulimit -n $NR_FILES
}
cleanup() {
- ip netns del $NS
+ cleanup_ns $NS
ulimit -n $SAVED_NR_FILES
}
--
2.43.0
next prev parent reply other threads:[~2023-12-19 9:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 9:48 [PATCH net-next 0/8] Convert net selftests to run in unique namespace (last part) Hangbin Liu
2023-12-19 9:48 ` [PATCH net-next 1/8] selftests/net: convert gre_gso.sh to run it in unique namespace Hangbin Liu
2023-12-19 9:48 ` [PATCH net-next 2/8] selftests/net: convert netns-name.sh " Hangbin Liu
2023-12-19 9:48 ` [PATCH net-next 3/8] selftests/net: convert rtnetlink.sh " Hangbin Liu
2023-12-19 9:48 ` Hangbin Liu [this message]
2023-12-19 9:48 ` [PATCH net-next 5/8] selftests/net: convert xfrm_policy.sh " Hangbin Liu
2023-12-19 9:48 ` [PATCH net-next 6/8] selftests/net: use unique netns name for setup_loopback.sh setup_veth.sh Hangbin Liu
2023-12-19 9:48 ` [PATCH net-next 7/8] selftests/net: convert pmtu.sh to run it in unique namespace Hangbin Liu
2023-12-19 9:48 ` [PATCH net-next 8/8] kselftest/runner.sh: add netns support Hangbin Liu
2023-12-23 0:30 ` [PATCH net-next 0/8] Convert net selftests to run in unique namespace (last part) patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231219094856.1740079-5-liuhangbin@gmail.com \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=kafai@fb.com \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=po-hsu.lin@canonical.com \
--cc=sbrivio@redhat.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox