[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231220140640.GG882741@kernel.org>
Date: Wed, 20 Dec 2023 15:06:40 +0100
From: Simon Horman <horms@...nel.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Daniel Mendes <dmendes@...hat.com>,
Florian Westphal <fw@...len.de>, David Miller <davem@...emloft.net>
Subject: Re: [PATCH net] kselftest: rtnetlink.sh: use grep_fail when
expecting the cmd fail
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@...il.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@...nel.org>
Powered by blists - more mailing lists