From: Hangbin Liu <liuhangbin@gmail.com>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>, Phil Sutter <phil@nwl.cc>,
David Ahern <dsahern@kernel.org>, Jiri Pirko <jiri@resnulli.us>,
netdev@vger.kernel.org
Subject: Re: [PATCH net] selftests: rtnetlink: use setup_ns in bonding test
Date: Tue, 16 Jan 2024 08:47:49 +0800 [thread overview]
Message-ID: <ZaXSNR5NMAh-qaG8@Laptop-X1> (raw)
In-Reply-To: <20240115135922.3662648-1-nicolas.dichtel@6wind.com>
On Mon, Jan 15, 2024 at 02:59:22PM +0100, Nicolas Dichtel wrote:
> This is a follow-up of commit a159cbe81d3b ("selftests: rtnetlink: check
> enslaving iface in a bond") after the merge of net-next into net.
>
> The goal is to follow the new convention,
> see commit d3b6b1116127 ("selftests/net: convert rtnetlink.sh to run it in
> unique namespace") for more details.
>
> Let's use also the generic dummy name instead of defining a new one.
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> tools/testing/selftests/net/rtnetlink.sh | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
> index a31be0eaaa50..4667d74579d1 100755
> --- a/tools/testing/selftests/net/rtnetlink.sh
> +++ b/tools/testing/selftests/net/rtnetlink.sh
> @@ -1244,21 +1244,19 @@ kci_test_address_proto()
>
> kci_test_enslave_bonding()
> {
> - local testns="testns"
> local bond="bond123"
> - local dummy="dummy123"
> local ret=0
>
> - run_cmd ip netns add "$testns"
> - if [ $ret -ne 0 ]; then
> + setup_ns testns
> + if [ $? -ne 0 ]; then
> end_test "SKIP bonding tests: cannot add net namespace $testns"
> return $ksft_skip
> fi
>
> run_cmd ip -netns $testns link add dev $bond type bond mode balance-rr
> - run_cmd ip -netns $testns link add dev $dummy type dummy
> - run_cmd ip -netns $testns link set dev $dummy up
> - run_cmd ip -netns $testns link set dev $dummy master $bond down
> + run_cmd ip -netns $testns link add dev $devdummy type dummy
> + run_cmd ip -netns $testns link set dev $devdummy up
> + run_cmd ip -netns $testns link set dev $devdummy master $bond down
> if [ $ret -ne 0 ]; then
> end_test "FAIL: initially up interface added to a bond and set down"
> ip netns del "$testns"
> --
> 2.39.2
>
Thanks for the update.
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
next prev parent reply other threads:[~2024-01-16 0:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 13:59 [PATCH net] selftests: rtnetlink: use setup_ns in bonding test Nicolas Dichtel
2024-01-16 0:47 ` Hangbin Liu [this message]
2024-01-17 2:00 ` 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=ZaXSNR5NMAh-qaG8@Laptop-X1 \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
--cc=phil@nwl.cc \
/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;
as well as URLs for NNTP newsgroup(s).