From: Simon Horman <horms@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Daniel Mendes <dmendes@redhat.com>,
Florian Westphal <fw@strlen.de>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH net] kselftest: rtnetlink.sh: use grep_fail when expecting the cmd fail
Date: Wed, 20 Dec 2023 15:06:40 +0100 [thread overview]
Message-ID: <20231220140640.GG882741@kernel.org> (raw)
In-Reply-To: <20231219065737.1725120-1-liuhangbin@gmail.com>
On Tue, Dec 19, 2023 at 02:57:37PM +0800, Hangbin Liu wrote:
> run_cmd_grep_fail should be used when expecting the cmd fail, or the ret
> will be set to 1, and the total test return 1 when exiting. This would cause
> the result report to fail if run via run_kselftest.sh.
>
> Before fix:
> # ./rtnetlink.sh -t kci_test_addrlft
> PASS: preferred_lft addresses have expired
> # echo $?
> 1
>
> After fix:
> # ./rtnetlink.sh -t kci_test_addrlft
> PASS: preferred_lft addresses have expired
> # echo $?
> 0
>
> Fixes: 9c2a19f71515 ("kselftest: rtnetlink.sh: add verbose flag")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Thanks,
I agree that this corrects inverted logic wrt setting
the global 'ret' value and in turn the exit value of the script.
I also agree that the problem was introduced by the cited commit.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2023-12-20 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 6:57 [PATCH net] kselftest: rtnetlink.sh: use grep_fail when expecting the cmd fail Hangbin Liu
2023-12-20 14:06 ` Simon Horman [this message]
2023-12-21 8:40 ` 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=20231220140640.GG882741@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=dmendes@redhat.com \
--cc=fw@strlen.de \
--cc=liuhangbin@gmail.com \
--cc=netdev@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 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.