lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMy_GT-kMCE1pbkSxg+O2Ev8h49KWneX6xDy4KHn30njHxK=OQ@mail.gmail.com>
Date: Tue, 31 Oct 2023 12:41:42 +0800
From: Po-Hsu Lin <po-hsu.lin@...onical.com>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, 
	Jakub Kicinski <kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, 
	Shuah Khan <shuah@...nel.org>, David Ahern <dsahern@...nel.org>, linux-kselftest@...r.kernel.org
Subject: Re: [PATCHv2 net] selftests: pmtu.sh: fix result checking

On Tue, Oct 31, 2023 at 11:47 AM Hangbin Liu <liuhangbin@...il.com> wrote:
>
> In the PMTU test, when all previous tests are skipped and the new test
> passes, the exit code is set to 0. However, the current check mistakenly
> treats this as an assignment, causing the check to pass every time.
>
> Consequently, regardless of how many tests have failed, if the latest test
> passes, the PMTU test will report a pass.
>
> Fixes: 2a9d3716b810 ("selftests: pmtu.sh: improve the test result processing")
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
> v2: use "-eq" instead of "=" to make less error-prone
> ---
>  tools/testing/selftests/net/pmtu.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
> index f838dd370f6a..b3b2dc5a630c 100755
> --- a/tools/testing/selftests/net/pmtu.sh
> +++ b/tools/testing/selftests/net/pmtu.sh
> @@ -2048,7 +2048,7 @@ run_test() {
>         case $ret in
>                 0)
>                         all_skipped=false
> -                       [ $exitcode=$ksft_skip ] && exitcode=0
> +                       [ $exitcode -eq $ksft_skip ] && exitcode=0
>                 ;;
>                 $ksft_skip)
>                         [ $all_skipped = true ] && exitcode=$ksft_skip
> --
> 2.41.0
>
Acked-by: Po-Hsu Lin <po-hsu.lin@...onical.com>

Looking good to me, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ