summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2023-10-31 11:47:32 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-20 11:59:35 +0100
commit05f5b4bef3a44826892603dbf35f9e7455a96d27 (patch)
treead6f841bdb57a5c7ee464738d7247fb3ddef0ed6 /tools
parentf93f84b203cd0c612cab9f452dbb3a8d519b21db (diff)
downloadlinux-05f5b4bef3a44826892603dbf35f9e7455a96d27.tar.gz
linux-05f5b4bef3a44826892603dbf35f9e7455a96d27.tar.bz2
linux-05f5b4bef3a44826892603dbf35f9e7455a96d27.zip
selftests: pmtu.sh: fix result checking
[ Upstream commit 63e201916b27260218e528a2f8758be47f99bbf4 ] 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> Acked-by: Po-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/net/pmtu.sh2
1 files changed, 1 insertions, 1 deletions
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