* [PATCHv2 net] selftests: pmtu.sh: fix result checking
@ 2023-10-31 3:47 Hangbin Liu
2023-10-31 4:41 ` Po-Hsu Lin
2023-11-03 9:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Hangbin Liu @ 2023-10-31 3:47 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
Shuah Khan, David Ahern, linux-kselftest, Po-Hsu Lin, Hangbin Liu
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@gmail.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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCHv2 net] selftests: pmtu.sh: fix result checking
2023-10-31 3:47 [PATCHv2 net] selftests: pmtu.sh: fix result checking Hangbin Liu
@ 2023-10-31 4:41 ` Po-Hsu Lin
2023-11-03 9:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Po-Hsu Lin @ 2023-10-31 4:41 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, David S. Miller, Jakub Kicinski, Eric Dumazet,
Paolo Abeni, Shuah Khan, David Ahern, linux-kselftest
On Tue, Oct 31, 2023 at 11:47 AM Hangbin Liu <liuhangbin@gmail.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@gmail.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@canonical.com>
Looking good to me, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCHv2 net] selftests: pmtu.sh: fix result checking
2023-10-31 3:47 [PATCHv2 net] selftests: pmtu.sh: fix result checking Hangbin Liu
2023-10-31 4:41 ` Po-Hsu Lin
@ 2023-11-03 9:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-11-03 9:20 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, davem, kuba, edumazet, pabeni, shuah, dsahern,
linux-kselftest, po-hsu.lin
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Tue, 31 Oct 2023 11:47:32 +0800 you 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.
>
> [...]
Here is the summary with links:
- [PATCHv2,net] selftests: pmtu.sh: fix result checking
https://git.kernel.org/netdev/net/c/63e201916b27
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-03 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31 3:47 [PATCHv2 net] selftests: pmtu.sh: fix result checking Hangbin Liu
2023-10-31 4:41 ` Po-Hsu Lin
2023-11-03 9:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox