Commit 098f1ce0 authored by Hangbin Liu's avatar Hangbin Liu Committed by David S. Miller

selftests/net: convert stress_reuseport_listen.sh to run it in unique namespace

Here is the test result after conversion.

 # ./stress_reuseport_listen.sh
 listen 24000 socks took 0.47714
Acked-by: default avatarDavid Ahern <dsahern@kernel.org>
Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d3b6b111
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment