All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] selftests: mptcp: diag: return KSFT_FAIL not test_cnt" failed to apply to 5.15-stable tree
@ 2024-03-27 14:46 gregkh
  2024-03-29 14:51 ` [PATCH 5.15.y] selftests: mptcp: diag: return KSFT_FAIL not test_cnt Matthieu Baerts (NGI0)
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2024-03-27 14:46 UTC (permalink / raw)
  To: tanggeliang, davem, matttbe; +Cc: stable


The 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 <stable@vger.kernel.org>.

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 '<stable@vger.kernel.org>' --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 <tanggeliang@kylinos.cn>
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.

Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
Cc: stable@vger.kernel.org
Fixes: 42fb6cddec3b ("selftests: mptcp: more stable diag tests")
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh
index f300f4e1eb59..18d37d4695c1 100755
--- a/tools/testing/selftests/net/mptcp/diag.sh
+++ b/tools/testing/selftests/net/mptcp/diag.sh
@@ -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}"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 5.15.y] selftests: mptcp: diag: return KSFT_FAIL not test_cnt
  2024-03-27 14:46 FAILED: patch "[PATCH] selftests: mptcp: diag: return KSFT_FAIL not test_cnt" failed to apply to 5.15-stable tree gregkh
@ 2024-03-29 14:51 ` Matthieu Baerts (NGI0)
  2024-03-30  8:41   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Baerts (NGI0) @ 2024-03-29 14:51 UTC (permalink / raw)
  To: stable, gregkh
  Cc: MPTCP Upstream, Geliang Tang, Matthieu Baerts, David S . Miller

From: Geliang Tang <tanggeliang@kylinos.cn>

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.

Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
Cc: stable@vger.kernel.org
Fixes: 42fb6cddec3b ("selftests: mptcp: more stable diag tests")
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 45bcc0346561daa3f59e19a753cc7f3e08e8dff1)
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
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(-)

diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh
index 57a681107f73..a8178a9c1e10 100755
--- a/tools/testing/selftests/net/mptcp/diag.sh
+++ b/tools/testing/selftests/net/mptcp/diag.sh
@@ -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
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 5.15.y] selftests: mptcp: diag: return KSFT_FAIL not test_cnt
  2024-03-29 14:51 ` [PATCH 5.15.y] selftests: mptcp: diag: return KSFT_FAIL not test_cnt Matthieu Baerts (NGI0)
@ 2024-03-30  8:41   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2024-03-30  8:41 UTC (permalink / raw)
  To: Matthieu Baerts (NGI0)
  Cc: stable, MPTCP Upstream, Geliang Tang, David S . Miller

On Fri, Mar 29, 2024 at 03:51:05PM +0100, Matthieu Baerts (NGI0) wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> 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.
> 
> Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
> Cc: stable@vger.kernel.org
> Fixes: 42fb6cddec3b ("selftests: mptcp: more stable diag tests")
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> (cherry picked from commit 45bcc0346561daa3f59e19a753cc7f3e08e8dff1)
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> 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.

Both now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-30  8:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 14:46 FAILED: patch "[PATCH] selftests: mptcp: diag: return KSFT_FAIL not test_cnt" failed to apply to 5.15-stable tree gregkh
2024-03-29 14:51 ` [PATCH 5.15.y] selftests: mptcp: diag: return KSFT_FAIL not test_cnt Matthieu Baerts (NGI0)
2024-03-30  8:41   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.