From: Simon Horman <horms@kernel.org>
To: Zhengchao Shao <shaozhengchao@huawei.com>
Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
shuah@kernel.org, j.vosburgh@gmail.com, andy@greyhouse.net,
weiyongjun1@huawei.com, yuehaibing@huawei.com
Subject: Re: [PATCH net-next] selftests: bonding: delete link1_1 in the cleanup path
Date: Thu, 24 Aug 2023 10:50:07 +0200 [thread overview]
Message-ID: <20230824085007.GE3523530@kernel.org> (raw)
In-Reply-To: <20230823032640.3609934-1-shaozhengchao@huawei.com>
On Wed, Aug 23, 2023 at 11:26:40AM +0800, Zhengchao Shao wrote:
> If failed to set link1_1 to netns client, we should delete link1_1 in the
> cleanup path. But if set link1_1 to netns client successfully, delete
> link1_1 will report warning. So delete link1_1 in the cleanup path and
> drop any warning message.
Hi Zhengchao Shao,
It seems unfortunate to drop all warning and error messages.
What if the message is about something other than link1_1 not existing?
Would it be practical to check if link1_1 exists,
say by looking in sysfs, before trying to delete it?
> Reported-by: Hangbin Liu <liuhangbin@gmail.com>
> Closes: https://lore.kernel.org/all/ZNyJx1HtXaUzOkNA@Laptop-X1/
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> .../drivers/net/bonding/bond-arp-interval-causes-panic.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh b/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
> index 7b2d421f09cf..2b3c678c5205 100755
> --- a/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
> +++ b/tools/testing/selftests/drivers/net/bonding/bond-arp-interval-causes-panic.sh
> @@ -11,6 +11,7 @@ finish()
> {
> ip netns delete server || true
> ip netns delete client || true
> + ip link del link1_1 >/dev/null 2>&1
> }
>
> trap finish EXIT
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2023-08-24 8:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 3:26 [PATCH net-next] selftests: bonding: delete link1_1 in the cleanup path Zhengchao Shao
2023-08-24 8:50 ` Simon Horman [this message]
2023-08-24 10:31 ` Paolo Abeni
2023-08-24 13:25 ` shaozhengchao
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=20230824085007.GE3523530@kernel.org \
--to=horms@kernel.org \
--cc=andy@greyhouse.net \
--cc=j.vosburgh@gmail.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shaozhengchao@huawei.com \
--cc=shuah@kernel.org \
--cc=weiyongjun1@huawei.com \
--cc=yuehaibing@huawei.com \
/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).