Patch "selftests: mptcp: diag: fix bash warnings on older kernels" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: mptcp: diag: fix bash warnings on older kernels

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-mptcp-diag-fix-bash-warnings-on-older-kernels.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 694bd45980a61045eb5ec07799e3b94c76db830e Mon Sep 17 00:00:00 2001
From: "Matthieu Baerts (NGI0)" <matttbe@xxxxxxxxxx>
Date: Thu, 15 Feb 2024 19:25:36 +0100
Subject: selftests: mptcp: diag: fix bash warnings on older kernels

From: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>

commit 694bd45980a61045eb5ec07799e3b94c76db830e upstream.

Since the 'Fixes' commit mentioned below, the command that is executed
in __chk_nr() helper can return nothing if the feature is not supported.
This is the case when the MPTCP CURRESTAB counter is not supported.

To avoid this warning ...

  ./diag.sh: line 65: [: !=: unary operator expected

.. we just need to surround '$nr' with double quotes, to support an
empty string when the feature is not supported.

Fixes: 81ab772819da ("selftests: mptcp: diag: check CURRESTAB counters")
Cc: stable@xxxxxxxxxxxxxxx
Reviewed-by: Geliang Tang <geliang@xxxxxxxxxx>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 tools/testing/selftests/net/mptcp/diag.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh
index 04fcb8a077c9..e0615c6ffb8d 100755
--- a/tools/testing/selftests/net/mptcp/diag.sh
+++ b/tools/testing/selftests/net/mptcp/diag.sh
@@ -62,8 +62,8 @@ __chk_nr()
 	nr=$(eval $command)
 
 	printf "%-50s" "$msg"
-	if [ $nr != $expected ]; then
-		if [ $nr = "$skip" ] && ! mptcp_lib_expect_all_features; then
+	if [ "$nr" != "$expected" ]; then
+		if [ "$nr" = "$skip" ] && ! mptcp_lib_expect_all_features; then
 			echo "[ skip ] Feature probably not supported"
 			mptcp_lib_result_skip "${msg}"
 		else
-- 
2.44.0



Patches currently in stable-queue which might be from matttbe@xxxxxxxxxx are

queue-6.7/mptcp-fix-more-tx-path-fields-initialization.patch
queue-6.7/selftests-mptcp-diag-fix-bash-warnings-on-older-kernels.patch
queue-6.7/selftests-mptcp-pm-nl-also-list-skipped-tests.patch
queue-6.7/selftests-mptcp-diag-unique-cestab-subtest-names.patch
queue-6.7/mptcp-fix-lockless-access-in-subflow-ulp-diag.patch
queue-6.7/mptcp-use-mptcp_set_state.patch
queue-6.7/selftests-mptcp-pm-nl-avoid-error-msg-on-older-kernels.patch
queue-6.7/selftests-mptcp-diag-unique-in-use-subtest-names.patch
queue-6.7/mptcp-add-currestab-mib-counter-support.patch
queue-6.7/mptcp-corner-case-locking-for-rx-path-fields-initial.patch
queue-6.7/mptcp-add-needs_id-for-netlink-appending-addr.patch
queue-6.7/selftests-mptcp-diag-check-currestab-counters.patch
queue-6.7/selftests-mptcp-simult-flows-fix-some-subtest-names.patch
queue-6.7/mptcp-fix-data-races-on-remote_id.patch
queue-6.7/selftests-mptcp-userspace_pm-unique-subtest-names.patch
queue-6.7/mptcp-fix-duplicate-subflow-creation.patch
queue-6.7/mptcp-fix-data-races-on-local_id.patch
queue-6.7/mptcp-add-needs_id-for-userspace-appending-addr.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux