This is a note to let you know that I've just added the patch titled selftests: mptcp: diag: unique 'in use' subtest names 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-unique-in-use-subtest-names.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 645c1dc965ef6b5554e5e69737bb179c7a0f872f Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" <matttbe@xxxxxxxxxx> Date: Thu, 15 Feb 2024 19:25:39 +0100 Subject: selftests: mptcp: diag: unique 'in use' subtest names From: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx> commit 645c1dc965ef6b5554e5e69737bb179c7a0f872f upstream. It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated name. Some 'in use' subtests from the diag selftest had the same names, e.g.: chk 0 msk in use after flush Now the previous value is taken, to have different names, e.g.: chk 2->0 msk in use after flush While at it, avoid repeating the full message, declare it once in the helper. Fixes: ce9902573652 ("selftests: mptcp: diag: format subtests results in TAP") 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 | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -166,9 +166,13 @@ chk_msk_listen() chk_msk_inuse() { local expected=$1 - local msg="$2" + local msg="....chk ${2:-${expected}} msk in use" local listen_nr + if [ "${expected}" -eq 0 ]; then + msg+=" after flush" + fi + listen_nr=$(ss -N "${ns}" -Ml | grep -c LISTEN) expected=$((expected + listen_nr)) @@ -179,7 +183,7 @@ chk_msk_inuse() sleep 0.1 done - __chk_nr get_msk_inuse $expected "$msg" 0 + __chk_nr get_msk_inuse $expected "${msg}" 0 } # $1: ns, $2: port @@ -244,11 +248,11 @@ wait_connected $ns 10000 chk_msk_nr 2 "after MPC handshake " chk_msk_remote_key_nr 2 "....chk remote_key" chk_msk_fallback_nr 0 "....chk no fallback" -chk_msk_inuse 2 "....chk 2 msk in use" +chk_msk_inuse 2 chk_msk_cestab 2 flush_pids -chk_msk_inuse 0 "....chk 0 msk in use after flush" +chk_msk_inuse 0 "2->0" chk_msk_cestab 0 echo "a" | \ @@ -264,11 +268,11 @@ echo "b" | \ 127.0.0.1 >/dev/null & wait_connected $ns 10001 chk_msk_fallback_nr 1 "check fallback" -chk_msk_inuse 1 "....chk 1 msk in use" +chk_msk_inuse 1 chk_msk_cestab 1 flush_pids -chk_msk_inuse 0 "....chk 0 msk in use after flush" +chk_msk_inuse 0 "1->0" chk_msk_cestab 0 NR_CLIENTS=100 @@ -290,11 +294,11 @@ for I in `seq 1 $NR_CLIENTS`; do done wait_msk_nr $((NR_CLIENTS*2)) "many msk socket present" -chk_msk_inuse $((NR_CLIENTS*2)) "....chk many msk in use" +chk_msk_inuse $((NR_CLIENTS*2)) "many" chk_msk_cestab $((NR_CLIENTS*2)) flush_pids -chk_msk_inuse 0 "....chk 0 msk in use after flush" +chk_msk_inuse 0 "many->0" chk_msk_cestab 0 mptcp_lib_result_print_all_tap 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