From nobody Tue Feb 10 06:07:24 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 1A57D371068; Tue, 27 Jan 2026 19:27:48 +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=1769542069; cv=none; b=C0ABTDKk3pSOvOYdh6RGRT/wvUPym2fhsEaDSPSjWU0yFg9blJP12ASqvToHqAExEoURrpZ4Br2bRjOMMVTd5g7je9gElycbQsFahsF1+qjv/wg6mMN9dCyg5WcmhrlX4szigBefXfuC2LGHY/SbcSHRJR6d62V3XHR2u0OI2vs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769542069; c=relaxed/simple; bh=YWZ4ix1ch5qlLuSWWbNRRB4AMzc3t2vkQ0rmfUvdMo0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GMgfhX/fenyz5rgPhavB4ifYr61jlSEf8dXQG15sndQ3na8Ui3dYnEf42IBelwRgGCivvPXfSkXumOWFpbUjDd61+qpncmyJfgyGq9Q84pEECaQ6cquB4WLLvMbureicZIZtxh0V4GMCpADtNUUmrLVgmttWyrqUAWt27yskUk8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=szfTpObo; 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="szfTpObo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9648CC116C6; Tue, 27 Jan 2026 19:27:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769542068; bh=YWZ4ix1ch5qlLuSWWbNRRB4AMzc3t2vkQ0rmfUvdMo0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=szfTpOboUfJWOHlZcHnbxz0OhgcZEuMPpOl6s1H1HPdFIp0BveXba9y+ggpzyRhrJ rjHoaCuIFYFSUltPebBtL8CJtoFScroTAKaBSE/ClqzzOpr0SgK0HI9GAA3ZEOq1KU URhiaE3HVQ6jDXwSIfT7U+OtBTj+VwrGaVCA8qG6gT/wTciTBTaidx4+9zIbfj4tsm LYNuklkYSLb/O8p3nAVGCG8axJjKSlDZNEnK2JsiFmmJWZ/uqEyxfVLyfsxcO5D9uD L4IKh7Avz4tVNz0N3mV15U+zRvZDdQnuP7Oq8IkwcULnbuKBRfqMCcIDl7ZGKOHH4s SFMlhshg+Zsgw== From: "Matthieu Baerts (NGI0)" Date: Tue, 27 Jan 2026 20:27:26 +0100 Subject: [PATCH net 4/5] selftests: mptcp: check subflow errors in close events Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-net-mptcp-dup-nl-events-v1-4-7f71e1bc4feb@kernel.org> References: <20260127-net-mptcp-dup-nl-events-v1-0-7f71e1bc4feb@kernel.org> In-Reply-To: <20260127-net-mptcp-dup-nl-events-v1-0-7f71e1bc4feb@kernel.org> To: Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2760; i=matttbe@kernel.org; h=from:subject:message-id; bh=YWZ4ix1ch5qlLuSWWbNRRB4AMzc3t2vkQ0rmfUvdMo0=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDIrBZcXf331L8B469Rqh+akg4LnlGy4XMxtls3dYKZVI rbqbfeFjlIWBjEuBlkxRRbptsj8mc+reEu8/Cxg5rAygQxh4OIUgIlcM2f4H7+37WS+oE6JSOrV zVtWz3+1tq5qMlPbTeF5vWwTeOqZjjMyTPP23bfDjeONcnvq2qsO4gmXfhQwdob6Tq2//WNa9fQ cHgA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 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) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 23 ++++++++++++++++++++-= -- 1 file changed, 20 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 1765714a1e2f..3fc29201362a 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3847,21 +3847,28 @@ userspace_pm_chk_get_addr() fi } =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 - print_check "event ${ns} ${evt_name} (${exp})" + print_check "event ${ns} ${evt_name} (${exp}${attr_name})" =20 if [[ "${evt_name}" =3D "LISTENER_"* ]] && ! mptcp_lib_kallsyms_has "mptcp_event_pm_listener$"; then @@ -3873,6 +3880,16 @@ chk_evt_nr() if [ "${count}" !=3D "${exp}" ]; then fail_test "got ${count} events, expected ${exp}" cat "${evts}" + return + elif [ -z "${attr}" ]; then + print_ok + return + fi + + count=3D$(grep -w "type:${evt}" "${evts}" | grep -c ",${attr}:") + if [ "${count}" !=3D "${attr_exp}" ]; then + fail_test "got ${count} event attributes, expected ${attr_exp}" + grep -w "type:${evt}" "${evts}" else print_ok fi @@ -4131,7 +4148,7 @@ userspace_tests() chk_subflows_total 1 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_events_pids mptcp_lib_kill_group_wait $tests_pid --=20 2.51.0