From: Hangbin Liu <liuhangbin@gmail.com>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Cc: mptcp@lists.linux.dev, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <shuah@kernel.org>, Petr Machata <petrm@nvidia.com>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Geliang Tang <geliang@kernel.org>
Subject: Re: [PATCH net 1/3] selftests: net: lib: support errexit with busywait
Date: Wed, 5 Jun 2024 17:44:03 +0800 [thread overview]
Message-ID: <ZmAzY4eE9eaJ0IpE@Laptop-X1> (raw)
In-Reply-To: <20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-1-b3afadd368c9@kernel.org>
On Wed, Jun 05, 2024 at 11:21:16AM +0200, Matthieu Baerts (NGI0) wrote:
> If errexit is enabled ('set -e'), loopy_wait -- or busywait and others
> using it -- will stop after the first failure.
>
> Note that if the returned status of loopy_wait is checked, and even if
> errexit is enabled, Bash will not stop at the first error.
>
> Fixes: 25ae948b4478 ("selftests/net: add lib.sh")
Not sure if the fixes tag should be c5341bcc337c ("selftests: mlxsw: Add a
self-test for port-default priority"), so the fixes could be backported to
stable kernel for forwarding/lib.sh. Others looks good to me.
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
> Cc: stable@vger.kernel.org
> Acked-by: Geliang Tang <geliang@kernel.org>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> tools/testing/selftests/net/lib.sh | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh
> index edc030e81a46..a422e10d3d3a 100644
> --- a/tools/testing/selftests/net/lib.sh
> +++ b/tools/testing/selftests/net/lib.sh
> @@ -67,9 +67,7 @@ loopy_wait()
> while true
> do
> local out
> - out=$("$@")
> - local ret=$?
> - if ((!ret)); then
> + if out=$("$@"); then
> echo -n "$out"
> return 0
> fi
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-06-05 9:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 9:21 [PATCH net 0/3] selftests: net: lib: small fixes Matthieu Baerts (NGI0)
2024-06-05 9:21 ` [PATCH net 1/3] selftests: net: lib: support errexit with busywait Matthieu Baerts (NGI0)
2024-06-05 9:44 ` Hangbin Liu [this message]
2024-06-05 9:58 ` Matthieu Baerts
2024-06-05 9:21 ` [PATCH net 2/3] selftests: net: lib: avoid error removing empty netns name Matthieu Baerts (NGI0)
2024-06-05 10:38 ` Petr Machata
2024-06-05 14:12 ` Matthieu Baerts
2024-06-05 14:30 ` Petr Machata
2024-06-05 14:33 ` Matthieu Baerts
2024-06-06 2:15 ` Hangbin Liu
2024-06-05 9:21 ` [PATCH net 3/3] selftests: net: lib: set 'i' as local Matthieu Baerts (NGI0)
2024-06-06 2:13 ` Hangbin Liu
2024-06-06 15:40 ` [PATCH net 0/3] selftests: net: lib: small fixes 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=ZmAzY4eE9eaJ0IpE@Laptop-X1 \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geliang@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).