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 1/8] selftests/net: convert gre_gso.sh to run it in unique namespace
Date: Tue, 19 Dec 2023 17:48:49 +0800 [thread overview]
Message-ID: <20231219094856.1740079-2-liuhangbin@gmail.com> (raw)
In-Reply-To: <20231219094856.1740079-1-liuhangbin@gmail.com>
Here is the test result after conversion.
# ./gre_gso.sh
TEST: GREv6/v4 - copy file w/ TSO [ OK ]
TEST: GREv6/v4 - copy file w/ GSO [ OK ]
TEST: GREv6/v6 - copy file w/ TSO [ OK ]
TEST: GREv6/v6 - copy file w/ GSO [ OK ]
Tests passed: 4
Tests failed: 0
Acked-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
tools/testing/selftests/net/gre_gso.sh | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/tools/testing/selftests/net/gre_gso.sh b/tools/testing/selftests/net/gre_gso.sh
index 3224651db97b..5100d90f92d2 100755
--- a/tools/testing/selftests/net/gre_gso.sh
+++ b/tools/testing/selftests/net/gre_gso.sh
@@ -2,10 +2,8 @@
# SPDX-License-Identifier: GPL-2.0
# This test is for checking GRE GSO.
-
+source lib.sh
ret=0
-# Kselftest framework requirement - SKIP code is 4.
-ksft_skip=4
# all tests in this script. Can be overridden with -t option
TESTS="gre_gso"
@@ -13,8 +11,6 @@ TESTS="gre_gso"
VERBOSE=0
PAUSE_ON_FAIL=no
PAUSE=no
-IP="ip -netns ns1"
-NS_EXEC="ip netns exec ns1"
TMPFILE=`mktemp`
PID=
@@ -50,13 +46,13 @@ log_test()
setup()
{
set -e
- ip netns add ns1
- ip netns set ns1 auto
- $IP link set dev lo up
+ setup_ns ns1
+ IP="ip -netns $ns1"
+ NS_EXEC="ip netns exec $ns1"
ip link add veth0 type veth peer name veth1
ip link set veth0 up
- ip link set veth1 netns ns1
+ ip link set veth1 netns $ns1
$IP link set veth1 name veth0
$IP link set veth0 up
@@ -70,7 +66,7 @@ cleanup()
[ -n "$PID" ] && kill $PID
ip link del dev gre1 &> /dev/null
ip link del dev veth0 &> /dev/null
- ip netns del ns1
+ cleanup_ns $ns1
}
get_linklocal()
@@ -145,7 +141,7 @@ gre6_gso_test()
setup
a1=$(get_linklocal veth0)
- a2=$(get_linklocal veth0 ns1)
+ a2=$(get_linklocal veth0 $ns1)
gre_create_tun $a1 $a2
--
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 ` Hangbin Liu [this message]
2023-12-19 9:48 ` [PATCH net-next 2/8] selftests/net: convert netns-name.sh to run it in unique namespace Hangbin Liu
2023-12-19 9:48 ` [PATCH net-next 3/8] selftests/net: convert rtnetlink.sh " Hangbin Liu
2023-12-19 9:48 ` [PATCH net-next 4/8] selftests/net: convert stress_reuseport_listen.sh " Hangbin Liu
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-2-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