From nobody Mon Mar 2 08:30:01 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68C32347BBD; Wed, 11 Feb 2026 19:07:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770836824; cv=none; b=d9AWdSxGtH44xDdXhuY2MJuVPtfWM/WXz0sEVl0Q6RhW/WG8i1xlfxif8U/g/8hF/LgUTTAAjKzQIq37L1BqXegilU0rVa5NBexQWqdxRQjmEu8C8PA4RBAtzYUSoo1pGRR4wC1gIidv6oJdeiWomOCoSR4IMrShQOP2YIF2HCU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770836824; c=relaxed/simple; bh=6gFMK2Vf97i3HtqOLYHeDgbtTbc1n1AgCHsY6Wvr8yI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tm887FqdWPFqgw9nMLXtk6tWT/p9sFH+DcFAStqa0tV6mdFF+Hmqa+/yzfYElMrGChB3ph5ktdKubLQBRVHS48RnpiiIj2wl7QIQtOjG5c9dKKeba4qbu8kGtsD8MRSJsdleIBsPCcDXiHY3wT3OEcoDmqjT8pHtfG6GhPWhug0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K27vIPzB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K27vIPzB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A50B5C4CEF7; Wed, 11 Feb 2026 19:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770836824; bh=6gFMK2Vf97i3HtqOLYHeDgbtTbc1n1AgCHsY6Wvr8yI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K27vIPzBZaxwAHo6xM1REpmyJ+A9PHn5WZg2IE9SlcLB1DjkTRZPVNy7vWmquQ3o2 vbf/0P7YpgOtS72QUe3KCU1RUIzoeJYR3N8CQS81AzLdKosw/MjSx5/hziID5luGOq vRDKtvy1jgHCaJgW/fZwvT1KSc4L4srHxdevR6VZUUwo+aPGnu8rj7TejnA3ycN348 77yy3RZr7oQ2O61nNeMpawPbmjsGUN2mAfyDkvhybJOLHpdmwxTslwHxYdAyCXMw0d aNxkg6qoui/HZ600mr6I2b4dJ1TmPVka/Q7CFmbudvReb7P7znDy1GP26LxsF9EqCR JrMvsTcYSPuGg== From: "Matthieu Baerts (NGI0)" To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: "Matthieu Baerts (NGI0)" , sashal@kernel.org, Geliang Tang , Jakub Kicinski Subject: [PATCH 6.1.y 5/6] selftests: mptcp: check subflow errors in close events Date: Wed, 11 Feb 2026 20:06:23 +0100 Message-ID: <20260211190617.77192-13-matttbe@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260211190617.77192-8-matttbe@kernel.org> References: <20260211190617.77192-8-matttbe@kernel.org> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3369; i=matttbe@kernel.org; h=from:subject; bh=6gFMK2Vf97i3HtqOLYHeDgbtTbc1n1AgCHsY6Wvr8yI=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDJ7Lhskd0XvqD0krq4SOVGxMbcmwvVpkalKYvSc3+6Hd ZMPnzXuKGVhEONikBVTZJFui8yf+byKt8TLzwJmDisTyBAGLk4BmEhHCMMfrhU3dp1Nv++V6xVs 6aRxJ1ki7XOo8pGWvsyV8/bvXuypzMjwoiBVrjBvW+Vaj18yfo5fM4reznlWoSjkdkr2nQlvTzs fAA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" commit 2ef9e3a3845d0a20b62b01f5b731debd0364688d upstream. This validates the previous commit: subflow closed events should contain an error field when a subflow got closed with an error, e.g. reset or timeout. For this test, the chk_evt_nr helper has been extended to check attributes in the matched events. In this test, the 2 subflow closed events should have an error. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 15cc10453398 ("mptcp: deliver ssk errors to msk") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-4-7f71e1= bc4feb@kernel.org Signed-off-by: Jakub Kicinski [ Conflicts in mptcp_join.sh, because in this version, commit 20ccc7c5f7a3 ("selftests: mptcp: join: validate event numbers") has been backported with adaptations to display results correctly, see commit 5dc9170eee96 ("selftests: mptcp: join: validate event numbers") for more details. The same type of adaptations had to be made here as well. ] Signed-off-by: Matthieu Baerts (NGI0) --- .../testing/selftests/net/mptcp/mptcp_join.sh | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index f5ae51dcf811..7d4df90d6281 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3212,21 +3212,28 @@ userspace_pm_add_sf() sleep 1 } =20 -# $1: ns ; $2: event type ; $3: count +# $1: ns ; $2: event type ; $3: count ; [ $4: attr ; $5: attr count ] chk_evt_nr() { local ns=3D${1} local evt_name=3D"${2}" local exp=3D"${3}" + local attr=3D"${4}" + local attr_exp=3D"${5}" =20 local evts=3D"${evts_ns1}" local evt=3D"${!evt_name}" + local attr_name local count =20 + if [ -n "${attr}" ]; then + attr_name=3D", ${attr}: ${attr_exp}" + fi + evt_name=3D"${evt_name:16}" # without MPTCP_LIB_EVENT_ [ "${ns}" =3D=3D "ns2" ] && evts=3D"${evts_ns2}" =20 - printf "%-${nr_blank}s %s" " " "event ${ns} ${evt_name} (${exp})" + printf "%-${nr_blank}s %s" " " "event ${ns} ${evt_name} (${exp}${attr_nam= e})" =20 count=3D$(grep -cw "type:${evt}" "${evts}") if [ "${count}" !=3D "${exp}" ]; then @@ -3234,6 +3241,18 @@ chk_evt_nr() fail_test dump_stats cat "${evts}" + return + elif [ -z "${attr}" ]; then + echo "[ ok ]" + return + fi + + count=3D$(grep -w "type:${evt}" "${evts}" | grep -c ",${attr}:") + if [ "${count}" !=3D "${attr_exp}" ]; then + echo "[fail] got ${count} event attributes, expected ${attr_exp}" + fail_test + dump_stats + grep -w "type:${evt}" "${evts}" else echo "[ ok ]" fi @@ -3375,7 +3394,7 @@ userspace_tests() chk_subflow_nr "" "after reject" 1 userspace_pm_add_sf $ns2 10.0.1.2 0 wait_event ns2 MPTCP_LIB_EVENT_SUB_CLOSED 2 - chk_evt_nr ns2 MPTCP_LIB_EVENT_SUB_CLOSED 2 + chk_evt_nr ns2 MPTCP_LIB_EVENT_SUB_CLOSED 2 error 2 fi kill_wait "${tests_pid}" kill_events_pids --=20 2.51.0