FAILED: patch "[PATCH] selftests: mptcp: diag: return KSFT_FAIL not test_cnt" failed to apply to 5.15-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 45bcc0346561daa3f59e19a753cc7f3e08e8dff1
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024032713-identity-slightly-586d@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
45bcc0346561 ("selftests: mptcp: diag: return KSFT_FAIL not test_cnt") ce9902573652 ("selftests: mptcp: diag: format subtests results in TAP") dc97251bf0b7 ("selftests: mptcp: diag: skip listen tests if not supported") e04a30f78809 ("selftest: mptcp: add test for mptcp socket in use") 42fb6cddec3b ("selftests: mptcp: more stable diag tests") f2ae0fa68e28 ("selftests/mptcp: add diag listen tests") 0cd33c5ffec1 ("selftests: mptcp: fix diag instability")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 45bcc0346561daa3f59e19a753cc7f3e08e8dff1 Mon Sep 17 00:00:00 2001
From: Geliang Tang <[email protected]>
Date: Fri, 1 Mar 2024 18:11:22 +0100
Subject: [PATCH] selftests: mptcp: diag: return KSFT_FAIL not test_cnt
The test counter 'test_cnt' should not be returned in diag.sh, e.g. what if only the 4th test fail? Will do 'exit 4' which is 'exit ${KSFT_SKIP}', the whole test will be marked as skipped instead of 'failed'!
So we should do ret=${KSFT_FAIL} instead.
tools/testing/selftests/net/mptcp/diag.sh +3 -3
@@ -69,7 +69,7 @@ __chk_nr() else echo "[ fail ] expected $expected found $nr" mptcp_lib_result_fail "${msg}" - ret=$test_cnt + ret=${KSFT_FAIL} fi else echo "[ ok ]"
@@ -124,11 +124,11 @@ wait_msk_nr() if [ $i -ge $timeout ]; then echo "[ fail ] timeout while expecting $expected max $max last $nr" mptcp_lib_result_fail "${msg} # timeout" - ret=$test_cnt + ret=${KSFT_FAIL} elif [ $nr != $expected ]; then echo "[ fail ] expected $expected found $nr" mptcp_lib_result_fail "${msg} # unexpected result" - ret=$test_cnt + ret=${KSFT_FAIL} else echo "[ ok ]" mptcp_lib_result_pass "${msg}"
Matthieu Baerts (NGI0)
maintainerPATCH 1/1 selftests: mptcp: diag: return KSFT_FAIL not test_cnt
From: Geliang Tang <[email protected]>
The test counter 'test_cnt' should not be returned in diag.sh, e.g. what if only the 4th test fail? Will do 'exit 4' which is 'exit ${KSFT_SKIP}', the whole test will be marked as skipped instead of 'failed'!
So we should do ret=${KSFT_FAIL} instead.
---
Notes:
- Conflicts in diag.sh because the commit ce9902573652 ("selftests:
mptcp: diag: format subtests results in TAP") is not in v5.15 tree. These conflicts were in the context for an unrelated feature.
- Compared to the conflicts seen with the same patch in the v6.1 tree, there was an extra one here in v5.15 because the commit f2ae0fa68e28 ("selftests/mptcp: add diag listen tests") is no the in this tree: it moves the assignation of 'ret' in '__chk_nr()' under an extra check. The conflict was easy to fix, simply by changing the value of 'ret' from the previous location.
--- tools/testing/selftests/net/mptcp/diag.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/net/mptcp/diag.sh +3 -3
@@ -53,7 +53,7 @@ __chk_nr() printf "%-50s" "$msg" if [ $nr != $expected ]; then echo "[ fail ] expected $expected found $nr" - ret=$test_cnt + ret=${KSFT_FAIL} else echo "[ ok ]" fi
@@ -88,10 +88,10 @@ wait_msk_nr() printf "%-50s" "$msg" if [ $i -ge $timeout ]; then echo "[ fail ] timeout while expecting $expected max $max last $nr" - ret=$test_cnt + ret=${KSFT_FAIL} elif [ $nr != $expected ]; then echo "[ fail ] expected $expected found $nr" - ret=$test_cnt + ret=${KSFT_FAIL} else echo "[ ok ]" fi
Signature · 1 line
2.43.0
Greg KH
maintainerRe: [PATCH 5.15.y] selftests: mptcp: diag: return KSFT_FAIL not test_cnt
Quoted 17 lines · On Fri, Mar 29, 2024 at 03:51:05PM +0100, Matthieu Baerts (NGI0) wrote:
From: Geliang Tang <[email protected]>
The test counter '
test_cnt' should not be returned indiag.sh, e.g. what if only the 4th test fail? Will do 'exit 4' which is 'exit ${KSFT_SKIP}', the whole test will be marked as skipped instead of 'failed'!So we should do ret=${KSFT_FAIL} instead.
Fixes df62f2ec3df6 ("selftests/mptcp: add diag interface tests")Fixes 42fb6cddec3b ("selftests: mptcp: more stable diag tests")Signed-off-by Geliang Tang <[email protected]>Reviewed-by Matthieu Baerts (NGI0) <[email protected]>Signed-off-by Matthieu Baerts (NGI0) <[email protected]>Signed-off-by David S. Miller <[email protected]>(cherry picked from commit 45bcc0346561daa3f59e19a753cc7f3e08e8dff1)Signed-off-by Matthieu Baerts (NGI0) <[email protected]>
Quoted 11 lines
---
Notes:
- Conflicts indiag.shbecause the commitce9902573652("selftests:
mptcp: diag: format subtests results in TAP") is not in v5.15 tree. These conflicts were in the context for an unrelated feature.
- Compared to the conflicts seen with the same patch in the v6.1 tree, there was an extra one here in v5.15 because the commitf2ae0fa68e28("selftests/mptcp: add diag listen tests") is no the in this tree: it moves the assignation of 'ret' in '__chk_nr()' under an extra check. The conflict was easy to fix, simply by changing the value of 'ret' from the previous location.
Both now queued up, thanks.
greg k-h