From: Hangbin Liu <hangbin.liu@linux.dev>
To: Ido Schimmel <idosch@nvidia.com>
Cc: David Ahern <dsahern@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
Ido Schimmel <idosch@mellanox.com>,
David Ahern <dsahern@gmail.com>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, Hangbin Liu <liuhangbin@kylinos.cn>,
Sashiko <netdev-bot+sashiko@kernel.org>
Subject: Re: [PATCH net] selftests: fib_tests: use per-test return value in subtests
Date: Wed, 30 Sep 2026 08:54:10 +0800 [thread overview]
Message-ID: <arxdshcuvddlf5WP@fedora> (raw)
In-Reply-To: <20260929134517.GA832345@shredder>
On Tue, Sep 29, 2026 at 04:45:17PM +0300, Ido Schimmel wrote:
> On Tue, Sep 29, 2026 at 09:57:01AM +0800, Hangbin Liu wrote:
> > From: Hangbin Liu <liuhangbin@kylinos.cn>
> >
> > fib_tests mixes use of $ret for both per-test return value and global exit
> > code. If an earlier subtest fails and a later function sets ret=0, the
> > script will exit with status 0 even though [FAIL] lines were printed.
> >
> > Use RET as the per-test return value, as already defined in lib.sh. The
> > exit code ret will only be set in log_test().
> >
> > Fixes: 607bd2e502f5 ("selftests: fib_tests: Add test cases for IPv4/IPv6 FIB")
> > Reported-by: Sashiko <netdev-bot+sashiko@kernel.org>
> > Closes: https://lore.kernel.org/all/178961184152.22033.9267194009793243294@kernel.org
> > Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
>
> Please target the patch at net-next and drop the Fixes tag. The patch
> doesn't fix a regression, nothing is failing (or passing when it
> shouldn't) because of it and it cannot be backported cleanly to old
> kernels anyway. I targeted similar patches at net-next in the past. See
> [1], for example.
>
> [1] https://lore.kernel.org/all/20250908073238.119240-5-idosch@nvidia.com/
OK, got it.
>
> > ---
> > tools/testing/selftests/net/fib_tests.sh | 40 ++++++++++++++++----------------
> > 1 file changed, 20 insertions(+), 20 deletions(-)
> >
> > diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
> > index b338bfb196a2..9ce5623b049c 100755
> > --- a/tools/testing/selftests/net/fib_tests.sh
> > +++ b/tools/testing/selftests/net/fib_tests.sh
> > @@ -369,7 +369,7 @@ fib_carrier_local_test()
> >
> > fib_carrier_unicast_test()
> > {
> > - ret=0
> > + RET=0
>
> Looks like this line can be removed (similar to fib_carrier_local_test()
> above it) given that RET is never used in this function
Right, I will remove it.
Thanks
Hangbin
next prev parent reply other threads:[~2026-09-30 0:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 1:57 [PATCH net] selftests: fib_tests: use per-test return value in subtests Hangbin Liu
2026-09-29 13:45 ` Ido Schimmel
2026-09-30 0:54 ` Hangbin Liu [this message]
2026-10-01 4:58 ` netdev-bot+sashiko
2026-10-01 13:55 ` Ido Schimmel
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=arxdshcuvddlf5WP@fedora \
--to=hangbin.liu@linux.dev \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@mellanox.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@kylinos.cn \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.