From nobody Wed Dec 4 18:54:31 2024 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 D8F2013B2AC for ; Tue, 6 Aug 2024 11:19:06 +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=1722943146; cv=none; b=OWaLf6lThMrwbGHVDVa7sTHnoYKMw/5wagthjBGMcLiC46JL24379YBrmOKNs05ghS/T8Q+TArGQqL1Tyjrtk/Ps4E1XQgPyCM2czx0b5vYY0KJUj32oF6MaMYmQYqSiSUITa7tdlHXgiHZyT8akS/wW924V7c672VdYjHyQlFQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722943146; c=relaxed/simple; bh=fmjxhC/ZoHiChWVetnjFuqjsv4acoJhHSK+S4Qit81c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ri+3UDUxDufb9cQ3/IdNPKaGEMTggjIp6FO2qnxCoCkiPf00zadKq7ztAma/TmX5ItNujXlG9hq9uL9RyCee1wGQzWrKjXFk95N//UBzGRoVILAHnjrLemjrKWFwdrzNnqz01QauG6I5U2A+Sr31W2UN4E6AgbOFXR7kZltQIpE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KJB7YVVN; 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="KJB7YVVN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1AE5C4AF09; Tue, 6 Aug 2024 11:19:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722943146; bh=fmjxhC/ZoHiChWVetnjFuqjsv4acoJhHSK+S4Qit81c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KJB7YVVN8mvheVaE6an3g7MItuZFbCaY204CDkh4yXXX1LgSOccW5SFJlZNWirEiB eDI7RjLd/BTNTSep6KthZnIfk/OKF87+pnbeIYSqDoJzi3A7g2uKkxSMGEDvfoPY4W yfzoWFzkk+/xMZJtzX4kuLpO/C0tBkBFjU/Duxy9WfvQNQ5NvUMPC8SWJmIq5xSOYP nUxYGTkFyArynHhiJLId8oP63zWJEAwClINqQL9jCE/1yvjTL1yKBVwok6qRsjqdDB IPuHtCAvUAPccyKPWq8OUOjnc2DashV0UeWhRfctzNOweWaKUBvbPiyvRQSiDfqi3p cgYVMIVVKRqJQ== From: "Matthieu Baerts (NGI0)" Date: Tue, 06 Aug 2024 13:18:49 +0200 Subject: [PATCH mptcp-next v3 1/8] selftests: mptcp: join: no extra msg if no counter 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: <20240806-mptcp-join-tx-mib-v3-1-c3b54d2099e9@kernel.org> References: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> In-Reply-To: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> To: mptcp@lists.linux.dev Cc: "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2529; i=matttbe@kernel.org; h=from:subject:message-id; bh=fmjxhC/ZoHiChWVetnjFuqjsv4acoJhHSK+S4Qit81c=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmsgaorZtLVzfJC44ajt3cJHFTvyUFPhuQ/Yxnj CvLwr6ixaCJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZrIGqAAKCRD2t4JPQmmg c8dAD/9BrjUCIqFj40YxcP3GP5oPsxvLrj1VMZ5+TuOiOs4mC9qqmJamLdbKyiA+3YWBZK414dG X07Lshzw9jZ3mtNEIgNAgyKZtUTIm4Y8E916OUl8IQynHGB/Am45jRNo5xRCT45atHrrYs9r++7 D0LuUJkxBkmyiMW0LZuJ0jZST8auRQretvyRUe5MTQEmbvUyhqhcnsGAGr9rwzw4T9u1oo+wOcF UTQx6TrQS2nGF9ZaoBpdxDmVsfttHTSQjWX1M5P2qPYrNlZsJZDpRJdfUwrzoH3Hgf7kgoPmCx7 XdqHLhEyXYQAluQEnodsagMscoP4MuSRvgfiMUj6mH4C8QspzB7vzrLDmm7Kpn3DqOIh13ih8N+ op6A73wAeLmOywVfkaNUYHC/IfJCPoT4LV6MkiGVl96v76i9WTjNaqBjiikiNQALuq3dKBSmKBD SAxOZAydTQavAPG4F7dzknS7A266hDuro9PrlrjatCZQyzUIAVpD1Znt7hUTOWCRB92K9xjAEZO GGe3d+Eboo8KIr0BuUdyCNnTV3IWWfnMUVt2urLkbJUUdw2U7N5amhKpR6uFwpgewTOUaWgPVlj 9mI5BhkygP8+4LUqbbNZcfKPwLgqVQOyYWxJHi7VvR4U5FsFvtNZ20fqtRuyM8mpJATImp1hzor gIElx+Mpr9+VmlA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 The checksum and fail counters might not be available. Then no need to display an extra message with missing info. While at it, fix the indentation around, which is wrong since the same commit. Fixes: 47867f0a7e83 ("selftests: mptcp: join: skip check if MIB counter not= supported") Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 01c1e0871aca..a1f80dac59a7 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -1112,7 +1112,7 @@ chk_csum_nr() =20 print_check "sum" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtDataCsumErr") - if [ "$count" !=3D "$csum_ns1" ]; then + if [ -n "$count" ] && [ "$count" !=3D "$csum_ns1" ]; then extra_msg+=3D" ns1=3D$count" fi if [ -z "$count" ]; then @@ -1125,7 +1125,7 @@ chk_csum_nr() fi print_check "csum" count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtDataCsumErr") - if [ "$count" !=3D "$csum_ns2" ]; then + if [ -n "$count" ] && [ "$count" !=3D "$csum_ns2" ]; then extra_msg+=3D" ns2=3D$count" fi if [ -z "$count" ]; then @@ -1169,13 +1169,13 @@ chk_fail_nr() =20 print_check "ftx" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPFailTx") - if [ "$count" !=3D "$fail_tx" ]; then + if [ -n "$count" ] && [ "$count" !=3D "$fail_tx" ]; then extra_msg+=3D",tx=3D$count" fi if [ -z "$count" ]; then print_skip elif { [ "$count" !=3D "$fail_tx" ] && [ $allow_tx_lost -eq 0 ]; } || - { [ "$count" -gt "$fail_tx" ] && [ $allow_tx_lost -eq 1 ]; }; then + { [ "$count" -gt "$fail_tx" ] && [ $allow_tx_lost -eq 1 ]; }; then fail_test "got $count MP_FAIL[s] TX expected $fail_tx" else print_ok @@ -1183,13 +1183,13 @@ chk_fail_nr() =20 print_check "failrx" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPFailRx") - if [ "$count" !=3D "$fail_rx" ]; then + if [ -n "$count" ] && [ "$count" !=3D "$fail_rx" ]; then extra_msg+=3D",rx=3D$count" fi if [ -z "$count" ]; then print_skip elif { [ "$count" !=3D "$fail_rx" ] && [ $allow_rx_lost -eq 0 ]; } || - { [ "$count" -gt "$fail_rx" ] && [ $allow_rx_lost -eq 1 ]; }; then + { [ "$count" -gt "$fail_rx" ] && [ $allow_rx_lost -eq 1 ]; }; then fail_test "got $count MP_FAIL[s] RX expected $fail_rx" else print_ok --=20 2.45.2 From nobody Wed Dec 4 18:54:31 2024 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 03DCB13B2AC for ; Tue, 6 Aug 2024 11:19:07 +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=1722943148; cv=none; b=VsS1paYDvHOcUiqXQDLZ0wyjw/MZEPFdY/+6+MdGnI3qMJB1iEGSWIxkGSs050+agGxBzdiuBspb7avPNJspMyRZ8f/QKM5Xi7e7byURgJcATNAWHFPTv5B2hVt0BiUsR1Dpc/1TPqMwIc5V8sDP98m9hXTukxFEJbsJQ7kz30k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722943148; c=relaxed/simple; bh=4LS7mEH8SCX/ybuWunoK7nr36GkF/sL9fRCxtKE/smo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=S7fv+eu+5Nv8ETZ00vRYgaOq/X3jVPZbe792X7vR9VjdU/b1k9GfkLnpMR37gi0IHpEr/4qBOs2kxQ1L7SzRW2gMc5inOQGMsLBTHRIJpby/b4Iwop6SLtb8x+pigbTutCZpvz7APhFBhmr83Zxjnalkcjuim/vkJ92L4xGv9rw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D0rm3/du; 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="D0rm3/du" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0529C4AF0F; Tue, 6 Aug 2024 11:19:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722943147; bh=4LS7mEH8SCX/ybuWunoK7nr36GkF/sL9fRCxtKE/smo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=D0rm3/du5tmLGwvUDqC9377KSnbk+G5Dw8HTtC2Wsp6NYMvLcjHv8YH2RuzU4zODj Y8e9PBcIadJmaubHVRIyx+ZlC29U3CgoQ8PQD5mrE+OEmx3+ltYx8268RS23MQVGeo CeKa7jMdFkFvw4Xgz9oZcMCQ6YHpbXBsBc8oru6GLf+rcoGLDqQK6RsMSeD4AYSzJd 7ErYsUHPGmMWwpxsawS0Ay6nz98fMKDeG4fs8g8JBsZ3I32/T9dZecBKrh3+IAdgkN QCTFZGEZANFnu430Zy7QgFfbCGzmQJfZiBGfQOjF8CwSqHU6geiGnOr/SjG9hVgaPo FwFOeletcVDNg== From: "Matthieu Baerts (NGI0)" Date: Tue, 06 Aug 2024 13:18:50 +0200 Subject: [PATCH mptcp-next v3 2/8] mptcp: MIB counters for sent MP_JOIN 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: <20240806-mptcp-join-tx-mib-v3-2-c3b54d2099e9@kernel.org> References: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> In-Reply-To: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> To: mptcp@lists.linux.dev Cc: "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4799; i=matttbe@kernel.org; h=from:subject:message-id; bh=4LS7mEH8SCX/ybuWunoK7nr36GkF/sL9fRCxtKE/smo=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmsgaoZ0nlYodt+04sXgsz61Q1zr0kIsi3QdJwY a2ByVORIl2JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZrIGqAAKCRD2t4JPQmmg c3r+EACufPVeVe7KA+81tyIdYRDxcjni0Z59Gm96XqY2XHlBBSHR0ibc8V6uVKEaG3Z36asMnf3 393jOqAIfyYx/l7XaZJ4WtKIEUqqxQSRoq3X4ycMlbnqlPq28ArsHw7K0lGKEKuLtjCMmmYNeAG /ATC3GWnvgAKUUZJMsa3cM/NLrfH5S5FsyaRt/e1LjYYAfSZpEXY7QUoynEYNEE1s3mAPtWLX4g DvO2cLx4VYfDGMYbFjxf5bfk5QqhY0gv5day6ceCTOOMT/Qx2f1aFj52y1NzOh2tLm5WP5Oaraj zeDkYEQ4KdZij5R6/XMSN2NNanGOfBekTL5keH/6mfnn+FCLIMukiFA7QHaA89My2KSZ2Bdk8UN GMBYY7W+jPQS2hrLtxx2P8t72sU5yW90A3xHGRTZwy0ZPOm9MEm9k9a1pHejYINwWlvbwdKqcVh I9h5uEatPYtvYWBb0wcMPLW9ygILsZCrESI/1mOa38QN7nk5KLPr8/HW/cNNoAAFtV27R5h6+kP CHibDdISWLR9Y7XA9wRTu0a0i35H5HN0HAcc5dygivi7FntV3WYc54ouFetCc3daXpKtM5XgOHz uygLCrO6q/YCm/yUmiCx1vZbvvRSPW9S9ruS0/qlRjCaFrDJCNXwZU0yejcurCmL7vplZqP0SeB KoS5AS0T2yVHtgg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Recently, a few issues have been discovered around the creation of additional subflows. Without these counters, it was difficult to point out the reason why some subflows were not created as expected. These counters should have been added earlier, because there is no other simple ways to extract such information from the kernel, and understand why subflows have not been created. While at it, some pr_debug() have been added, just in case the errno needs to be printed. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/509 Signed-off-by: Matthieu Baerts (NGI0) --- Notes: - v2: - Add "ERR" suffix in variable names. (Geliang) - v3: - removed Fully Established Error counter: should only happen with the userspace PM, which will propagate the error in this case (ENOTCONN). (Geliang) --- net/mptcp/mib.c | 4 ++++ net/mptcp/mib.h | 4 ++++ net/mptcp/subflow.c | 21 ++++++++++++++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c index 7884217f33eb..ec0d461cb921 100644 --- a/net/mptcp/mib.c +++ b/net/mptcp/mib.c @@ -25,6 +25,10 @@ static const struct snmp_mib mptcp_snmp_list[] =3D { SNMP_MIB_ITEM("MPJoinSynAckHMacFailure", MPTCP_MIB_JOINSYNACKMAC), SNMP_MIB_ITEM("MPJoinAckRx", MPTCP_MIB_JOINACKRX), SNMP_MIB_ITEM("MPJoinAckHMacFailure", MPTCP_MIB_JOINACKMAC), + SNMP_MIB_ITEM("MPJoinSynTx", MPTCP_MIB_JOINSYNTX), + SNMP_MIB_ITEM("MPJoinSynTxCreatSkErr", MPTCP_MIB_JOINSYNTXCREATSKERR), + SNMP_MIB_ITEM("MPJoinSynTxBindErr", MPTCP_MIB_JOINSYNTXBINDERR), + SNMP_MIB_ITEM("MPJoinSynTxConnectErr", MPTCP_MIB_JOINSYNTXCONNECTERR), SNMP_MIB_ITEM("DSSNotMatching", MPTCP_MIB_DSSNOMATCH), SNMP_MIB_ITEM("InfiniteMapTx", MPTCP_MIB_INFINITEMAPTX), SNMP_MIB_ITEM("InfiniteMapRx", MPTCP_MIB_INFINITEMAPRX), diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h index 66aa67f49d03..d68136f93dac 100644 --- a/net/mptcp/mib.h +++ b/net/mptcp/mib.h @@ -20,6 +20,10 @@ enum linux_mptcp_mib_field { MPTCP_MIB_JOINSYNACKMAC, /* HMAC was wrong on SYN/ACK + MP_JOIN */ MPTCP_MIB_JOINACKRX, /* Received an ACK + MP_JOIN */ MPTCP_MIB_JOINACKMAC, /* HMAC was wrong on ACK + MP_JOIN */ + MPTCP_MIB_JOINSYNTX, /* Sending a SYN + MP_JOIN */ + MPTCP_MIB_JOINSYNTXCREATSKERR, /* Not able to create a socket when sendin= g a SYN + MP_JOIN */ + MPTCP_MIB_JOINSYNTXBINDERR, /* Not able to bind() the address when sendin= g a SYN + MP_JOIN */ + MPTCP_MIB_JOINSYNTXCONNECTERR, /* Not able to connect() when sending a SY= N + MP_JOIN */ MPTCP_MIB_DSSNOMATCH, /* Received a new mapping that did not match the p= revious one */ MPTCP_MIB_INFINITEMAPTX, /* Sent an infinite mapping */ MPTCP_MIB_INFINITEMAPRX, /* Received an infinite mapping */ diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index a7fb4d46e024..fdeb7df8b095 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1575,12 +1575,17 @@ int __mptcp_subflow_connect(struct sock *sk, const = struct mptcp_pm_local *local, u32 remote_token; int addrlen; =20 + /* The userspace PM sent the request too early? */ if (!mptcp_is_fully_established(sk)) goto err_out; =20 err =3D mptcp_subflow_create_socket(sk, local->addr.family, &sf); - if (err) + if (err) { + MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_JOINSYNTXCREATSKERR); + pr_debug("msk=3D%p local=3D%d remote:%d create sock error: %d\n", + msk, local_id, remote_id, err); goto err_out; + } =20 ssk =3D sf->sk; subflow =3D mptcp_subflow_ctx(ssk); @@ -1615,8 +1620,12 @@ int __mptcp_subflow_connect(struct sock *sk, const s= truct mptcp_pm_local *local, #endif ssk->sk_bound_dev_if =3D local->ifindex; err =3D kernel_bind(sf, (struct sockaddr *)&addr, addrlen); - if (err) + if (err) { + MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_JOINSYNTXBINDERR); + pr_debug("msk=3D%p local=3D%d remote:%d bind error: %d\n", + msk, local_id, remote_id, err); goto failed; + } =20 mptcp_crypto_key_sha(subflow->remote_key, &remote_token, NULL); pr_debug("msk=3D%p remote_token=3D%u local_id=3D%d remote_id=3D%d", msk, @@ -1631,8 +1640,14 @@ int __mptcp_subflow_connect(struct sock *sk, const s= truct mptcp_pm_local *local, sock_hold(ssk); list_add_tail(&subflow->node, &msk->conn_list); err =3D kernel_connect(sf, (struct sockaddr *)&addr, addrlen, O_NONBLOCK); - if (err && err !=3D -EINPROGRESS) + if (err && err !=3D -EINPROGRESS) { + MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_JOINSYNTXCONNECTERR); + pr_debug("msk=3D%p local=3D%d remote:%d connect error: %d\n", + msk, local_id, remote_id, err); goto failed_unlink; + } + + MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_JOINSYNTX); =20 /* discard the subflow socket */ mptcp_sock_graft(ssk, sk->sk_socket); --=20 2.45.2 From nobody Wed Dec 4 18:54:31 2024 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 A00FA13B2AC for ; Tue, 6 Aug 2024 11:19:08 +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=1722943148; cv=none; b=iHpg7b3cISP3nFP/Qsq64vgabHJamyyrLy38H24evbVs/6WHKgPTjXCRIOfovWiN6JU7jin2M+1NU8npHcoj+VlXTZS5ncewQ3REg1sgBGc34N+5djTeAO8rLda380jZxtW6EjcVUKks07i94Mxbe35NJSnABsA+nEKe9eyPlx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722943148; c=relaxed/simple; bh=4qOuC2MTCctuAx75QWVtBN5+Usgkze7z+2y087lwyDI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=piMl7Ie3p1ClhFhraCLpzO5gEUc6YgYg8q8ZVhpAgICp7ejBTiSAgiyt6EzjD1AAc2CEPJOdohA6+3d3kne9j8k5FkmJ9Bx9LW4fc9Cp5ULx6kFrUOnHaA/J5h+Hc8jaG5ALwk33+FqmmovO0CMV5/4JKpIObpi9E5MKwhBc1xc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LEG0ART7; 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="LEG0ART7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFDB6C32786; Tue, 6 Aug 2024 11:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722943148; bh=4qOuC2MTCctuAx75QWVtBN5+Usgkze7z+2y087lwyDI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LEG0ART7L4HegIx7rM6WkTM8oDEhjXpiPgaoviM+Iw9HyP92PBluMl9WMur7uKXiK o9jmBzTcyAkoerwG2pB6T3hn5cXti4AIUJqTKGausZ+4Yo0aSNNt/koaRdZHHq4PTV 8GV6etSv2kC23QoOvLDLXNbIIRke8xbrauZrPi4sjMwHWF1MIFDd8MWba/CBYWikgJ EdSdhVnPcJ+9cyapc5vt0uuA98CRaAk60+sPIDos1S1tvT/I8Dmism4pQ+UCQbSgfK faDiZcCpfxxI2ehRKfDufUjkYDyoLfNMs+8sAJYStuNBZA061iSz7wYLXsmkzpMxj2 JMZJNJps761NA== From: "Matthieu Baerts (NGI0)" Date: Tue, 06 Aug 2024 13:18:51 +0200 Subject: [PATCH mptcp-next v3 3/8] selftests: mptcp: join: reduce join_nr params 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: <20240806-mptcp-join-tx-mib-v3-3-c3b54d2099e9@kernel.org> References: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> In-Reply-To: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> To: mptcp@lists.linux.dev Cc: "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2785; i=matttbe@kernel.org; h=from:subject:message-id; bh=4qOuC2MTCctuAx75QWVtBN5+Usgkze7z+2y087lwyDI=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmsgaoT1nYl1nDiXHZMmFN5qQqMeuMIOpqwbK7K BXBr/RBRy6JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZrIGqAAKCRD2t4JPQmmg cwC0D/46r0rIkT6tCWNcyBHAMDcIqnBRUUGj0AGG1pSM3smu7g8r+9rNTOGshScIMUbnwrA/r7c TFGetnvEX+9FCgUMcu5DOT+WmLxhqDdvCd1cexHo4OIKwS0UQPWva7cUqnAD2brjtzfJxiuhEnw 05YAKvf4M5VEh4crnHzjrlnV7hbjQNQQnmZ47w12kJe7TQ3u5SqtFK7X/JO8DVTciomFVltrpQv SEvl04as8o/4VjJEGTnmmk1AxFMp2XljEplrzfOm5J455vSeXKlKd5R2age9mnAZc1FNjT+iDV8 xYjE6s+raFdeGrN0/msf7XsqatAVr84BPi0htvbYfsw9xt8WF6APvUgi+Q6CkVuUmYCaBOhIhXF vDKJxcbBiGi8+vAuFbJJfQ1W+oaGcrzFymxK0iPuRO7GOUinYSvqYSMANt+u5LlwkLURzV6MvA/ blD0ydsln9iDrJAaV094uY8iy/5SweGuTczZrL3Qwa/lshNSQNb3o2IiF5hd82CQJMrc1e8HbUk tW/G06/3yZQzDYMT3Pojgba4LJJpUTgJwh6hIpGFBypqOrdyd3ITy7aWHGFGBrlQB8VmKNJym6J D8Syf1gc3NwP0uk6r+WZGRPZzpddDV3zsztKAQpPBKOHr/SJwzLjqqBonAMW36BjmZmv9uOU+Oc 6nG+HX0pLJfSXmg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 chk_join_nr() currently takes 9 positional parameters, 6 of them are optional. It makes it hard to read: chk_join_nr 1 1 1 1 0 1 1 0 4 Naming these vars helps to make it easier to read: join_csum_ns1=3D1 join_csum_ns2=3D0 \ join_fail_nr=3D1 join_rst_nr=3D1 join_infi_nr=3D0 \ join_corrupted_pkts=3D4 \ chk_join_nr 1 1 1 It will then be easier to add new optional parameters. Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 31 ++++++++++++++++++---= ---- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index a1f80dac59a7..0401ba1aaf1b 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -61,6 +61,12 @@ unset sflags unset fastclose unset fullmesh unset speed +unset join_csum_ns1 +unset join_csum_ns2 +unset join_fail_nr +unset join_rst_nr +unset join_infi_nr +unset join_corrupted_pkts =20 # generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) =3D=3D 0x30) || # (ip6 && (ip6[74] & 0xf0) =3D=3D 0x30)'" @@ -1314,12 +1320,12 @@ chk_join_nr() local syn_nr=3D$1 local syn_ack_nr=3D$2 local ack_nr=3D$3 - local csum_ns1=3D${4:-0} - local csum_ns2=3D${5:-0} - local fail_nr=3D${6:-0} - local rst_nr=3D${7:-0} - local infi_nr=3D${8:-0} - local corrupted_pkts=3D${9:-0} + local csum_ns1=3D${join_csum_ns1:-0} + local csum_ns2=3D${join_csum_ns2:-0} + local fail_nr=3D${join_fail_nr:-0} + local rst_nr=3D${join_rst_nr:-0} + local infi_nr=3D${join_infi_nr:-0} + local corrupted_pkts=3D${join_corrupted_pkts:-0} local count local with_cookie =20 @@ -3138,7 +3144,8 @@ fastclose_tests() MPTCP_LIB_SUBTEST_FLAKY=3D1 test_linkfail=3D1024 fastclose=3Dserver \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 0 0 0 0 0 0 1 + join_rst_nr=3D1 \ + chk_join_nr 0 0 0 chk_fclose_nr 1 1 invert chk_rst_nr 1 1 fi @@ -3157,7 +3164,10 @@ fail_tests() MPTCP_LIB_SUBTEST_FLAKY=3D1 test_linkfail=3D128 \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 0 0 0 +1 +0 1 0 1 "$(pedit_action_pkts)" + join_csum_ns1=3D+1 join_csum_ns2=3D+0 \ + join_fail_nr=3D1 join_rst_nr=3D0 join_infi_nr=3D1 \ + join_corrupted_pkts=3D"$(pedit_action_pkts)" \ + chk_join_nr 0 0 0 chk_fail_nr 1 -1 invert fi =20 @@ -3170,7 +3180,10 @@ fail_tests() pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow test_linkfail=3D1024 \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 1 1 1 1 0 1 1 0 "$(pedit_action_pkts)" + join_csum_ns1=3D1 join_csum_ns2=3D0 \ + join_fail_nr=3D1 join_rst_nr=3D1 join_infi_nr=3D0 \ + join_corrupted_pkts=3D"$(pedit_action_pkts)" \ + chk_join_nr 1 1 1 fi } =20 --=20 2.45.2 From nobody Wed Dec 4 18:54:31 2024 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 EF70E13B2AC for ; Tue, 6 Aug 2024 11:19:09 +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=1722943150; cv=none; b=LDGhd7XrFyk1/p+w0c1eq/N4M9f1UGAnuMUvscilFGJejP/H3sewUoIxK79CNT6rMRiyH4c/3g7Gq390U9mhIIH2QDNgHJc9fHXtK0k6HAQOYMFZbB/vgyntNo8wPtGsoQeboKzUs3DZtL7CJXagrg1/gMD0sxOsFx66Vb/g+g0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722943150; c=relaxed/simple; bh=7eeIfWOdfy8EQiyo7rDxb3MXooMUvHzbK458WgX5nUQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=na7o76ISaq+NILlexjUOd+x9rbxqRS4tJVxSBBATIdVaGsgRru1LvwTr5aJayejiHHvuCZZi6xrKfVQGpqjLWkSO2Xqt8Y12ek2BrHZePlQdQKd3vRwoME69GsoR76MLbZ6xKFL6zwqwioUxW7aDK3IG8EoLSWKnKjH8JzScwxo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uQ58P8f5; 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="uQ58P8f5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED6AFC4AF0F; Tue, 6 Aug 2024 11:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722943149; bh=7eeIfWOdfy8EQiyo7rDxb3MXooMUvHzbK458WgX5nUQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uQ58P8f5dCZLJDOrqyvx6gUgZJYZCFv3Bec09xjyurMGBPsqmPve+dHCZifE7OD3Q ic5+m0qDdfb+DUF+TFP0IOMKLeco5Wg0RaP9Lm3T4RCKqjCjvRqlemc2hN4Gdi9GGI mY8O23tIXfI9DAPoknqgP1aYSBLv8zGeSnink9V5wYTxGAg6EvoUFfRbWqp/s2PUb+ MFvBpCUNfJYcsrLJxv8fevhO5h2twskP3t0cASmbxnxmJD62I+P9FeC83Mq65qsU42 40UwsMIXcB5RKdHd8UbnNWHV1qkdiMXjuUC41s5q1JYPCT0rdEhG1tJRfxNaJSz1Se KOka9klKBnHDw== From: "Matthieu Baerts (NGI0)" Date: Tue, 06 Aug 2024 13:18:52 +0200 Subject: [PATCH mptcp-next v3 4/8] selftests: mptcp: join: one line for join check 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: <20240806-mptcp-join-tx-mib-v3-4-c3b54d2099e9@kernel.org> References: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> In-Reply-To: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> To: mptcp@lists.linux.dev Cc: "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3082; i=matttbe@kernel.org; h=from:subject:message-id; bh=7eeIfWOdfy8EQiyo7rDxb3MXooMUvHzbK458WgX5nUQ=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmsgaoIBFHes6/cqnpd4P/+a1NUzRCV3BryRxJP YHxkcsuxO2JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZrIGqAAKCRD2t4JPQmmg cwjtEAC/IkEw2XezhFVWMUAOp7cLU2j5hf46quZaWHevqh7MHSYMdCNRcvRzivBwsNfq88JUH42 2CSMgq38ELIBvauoxv2AmliYBhNaXA5V+6z3Ev5roYd772YyXWJC4Yps14oUKBmFb/KjPIDcVVH IuRttSb9aUq4iVRAtq/PY+d4neoI0UKfc1wxOkLyty0BXiWDZT9hXMos6OQT1xaOdLCAeeu3COZ 4Myy/aPRr63h5BvN63O7mzpshFRPX2xr7MWI8owNtCXph9lQm1g+UH9G+txytJh/LbexwD8AhkQ qKnGBIOoNW4EL5W4y+KOOCfdyq1+btdy/oMk/DT4IXIs8xfIV9Jaiu8Id3xT5nw7oIGpDpwVvKU fSCYlRTkplmQ4z/PmqCnzYReXl5/9PvkYiGJl6/nM/qcwq18bWdBFYBkEtjJO297MfoKwecsUBV 7W/evU8l1FTaZG1yz5SsseMHmsBHFUqFnXZae5QLbB5NWL4sZhCef6r6eqarnjmpJIJ3/IpN0fW fq3lsa/sngDoQZ0bpqUlMjjqGkHGmTV1EFchbloL+VlpBUD0gLNHQ4ulCdp+avoP67ySHQen72d vnwgQnvASGUt7R4+IKAVT/QI2O9HClmHOup/gaPdpsVlZY5KlwFUFiAbhpWgyIOFevHYs1dDYMO 6EVTOj8HNl0r5Gg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Most tests are checking if the expected number of SYN/SYN+ACK/ACK JOINs have been received, each of them on one line. More Join related tests are going to be checked soon, no need to add 5 new lines per test in case of success, just one is enough. In case of issue, the errors will still be reported like before. Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 45 ++++++++++++++++-----= ---- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 0401ba1aaf1b..b10bcb1ac970 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -202,6 +202,22 @@ print_skip() mptcp_lib_pr_skip "${@}" } =20 +# $1: check name; $2: rc +print_results() +{ + local check=3D"${1}" + local rc=3D${2} + + print_check "${check}" + if [ ${rc} =3D ${KSFT_PASS} ]; then + print_ok + elif [ ${rc} =3D ${KSFT_SKIP} ]; then + print_skip + else + fail_test + fi +} + # [ $1: fail msg ] mark_as_skipped() { @@ -1326,6 +1342,7 @@ chk_join_nr() local rst_nr=3D${join_rst_nr:-0} local infi_nr=3D${join_infi_nr:-0} local corrupted_pkts=3D${join_corrupted_pkts:-0} + local rc=3D${KSFT_PASS} local count local with_cookie =20 @@ -1333,43 +1350,41 @@ chk_join_nr() print_info "${corrupted_pkts} corrupted pkts" fi =20 - print_check "syn" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtMPJoinSynRx") if [ -z "$count" ]; then - print_skip + rc=3D${KSFT_SKIP} elif [ "$count" !=3D "$syn_nr" ]; then + rc=3D${KSFT_FAIL} + print_check "syn" fail_test "got $count JOIN[s] syn expected $syn_nr" - else - print_ok fi =20 - print_check "synack" with_cookie=3D$(ip netns exec $ns2 sysctl -n net.ipv4.tcp_syncookies) count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtMPJoinSynAckRx") if [ -z "$count" ]; then - print_skip + rc=3D${KSFT_SKIP} elif [ "$count" !=3D "$syn_ack_nr" ]; then # simult connections exceeding the limit with cookie enabled could go up= to # synack validation as the conn limit can be enforced reliably only after # the subflow creation - if [ "$with_cookie" =3D 2 ] && [ "$count" -gt "$syn_ack_nr" ] && [ "$cou= nt" -le "$syn_nr" ]; then - print_ok - else + if [ "$with_cookie" !=3D 2 ] || [ "$count" -le "$syn_ack_nr" ] || [ "$co= unt" -gt "$syn_nr" ]; then + rc=3D${KSFT_FAIL} + print_check "synack" fail_test "got $count JOIN[s] synack expected $syn_ack_nr" fi - else - print_ok fi =20 - print_check "ack" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtMPJoinAckRx") if [ -z "$count" ]; then - print_skip + rc=3D${KSFT_SKIP} elif [ "$count" !=3D "$ack_nr" ]; then + rc=3D${KSFT_FAIL} + print_check "ack" fail_test "got $count JOIN[s] ack expected $ack_nr" - else - print_ok fi + + print_results "join Rx" ${rc} + if $validate_checksum; then chk_csum_nr $csum_ns1 $csum_ns2 chk_fail_nr $fail_nr $fail_nr --=20 2.45.2 From nobody Wed Dec 4 18:54:31 2024 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 EA33213B2AC for ; Tue, 6 Aug 2024 11:19:10 +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=1722943151; cv=none; b=EyaV/hCQcikhKJFwKShJomyjLg81mLxic8aF+j7sBZMyg/49kbIaFRRhVBGNLdEtLy8Hnb5ka7og5qCvK2kyx0KbCyxPTOSUi8ZHvJiZcjLCs5M23XjZSweeGV11yv/6r/Lxh9L7bSx9361B3vvbcO7XugSIc/NSKYFKTGu0gqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722943151; c=relaxed/simple; bh=VPLgy2ezHqxUsWZzlp6O9floU/WVlaFLfSiTDoQRh80=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cTihyFQDG+HxnQwmWRXmHQRAzYUSnDvhcZRCajl7pzQ4AHmHzerYBYodKZBFJyNVdLzSUzJsYFvBhK5csp7r4S1+Lbkea5Gizo96hwSsqr0m7N7JwR+n3P6zuhVwIANSd59ZYW+vDk0r/zacnfYiQ3SkB01rqlYjvPrAf67Nujw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sd9ymLKe; 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="sd9ymLKe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAF7EC4AF09; Tue, 6 Aug 2024 11:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722943150; bh=VPLgy2ezHqxUsWZzlp6O9floU/WVlaFLfSiTDoQRh80=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sd9ymLKePqKZLux+aEkkVky/eEgnnhHDBR1sjUl6cAdPstux1jCjSyF8D+iQ6PTsH ctmG/oU5Vg9WIzWrbwWEc+/NEujvq8HZGlFEer+YUvfP8pqWslOju5//c3jySnQ+my jckYQbndNHm9NhCwyneYVVvMh6nOh7BfaJ2jHNUMEmQwrHoTvAZKwY/wSS3Ezjl0bd mEou+/86HGnfQ1LtUDE5nAGKCFGuOEG2Fgg+4u3TthFhC6fXPesH2OkAyZySRAglCw FJSvb8cl2zZEE4iaHntgjhV/4qXaRap+8bkg0d2MyJQe9P+MGvp7/91ODaxqMrzY9/ 1NdbogF8gw1yQ== From: "Matthieu Baerts (NGI0)" Date: Tue, 06 Aug 2024 13:18:53 +0200 Subject: [PATCH mptcp-next v3 5/8] selftests: mptcp: join: validate MPJ SYN TX MIB counters 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: <20240806-mptcp-join-tx-mib-v3-5-c3b54d2099e9@kernel.org> References: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> In-Reply-To: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> To: mptcp@lists.linux.dev Cc: "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=5613; i=matttbe@kernel.org; h=from:subject:message-id; bh=VPLgy2ezHqxUsWZzlp6O9floU/WVlaFLfSiTDoQRh80=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmsgaou+b/1fwgxJR7R15/4yVHciFiPernbQpwT +SCWkp0MpyJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZrIGqAAKCRD2t4JPQmmg cx8bD/wOF8P6fCS7kNOB6rzXScUIX5JClr5w7g0Spi2sLEobyd631/pFIc6nRa1EhE9jDsCjShZ a3Sp5uhyNaTOvyEUYSSTSYX3xLCD+ie9yAt436R1zm1PwMvBvRODMlSK6CjSDNk1iDoD3ZRXFcj s2iO4+LjhHzxFsTUUQsClqSp3huIna/XqrtEaTpGoM9Q5s18ro0+W2pNVhVb0Yn2XphMWq9EU5y sI2/NH/bhYHNQNoyouguwGQknX1bz9MGttcHR2w6C7Tx7XrEbmstYx02t0Q1kDizTjuveWS8O0m 38v4wITlJj1B4E7ea4kQgKamOAjqBKu0Azg5oZXJmtGDdJQLv6xjdNATMX/Egc5noFSH8bgLm23 Tdya2bv8CeHAoFMuskwVZNglpPFqCnN/MSXXME5gJXbzoMe7R6Mnh7i6ewgzzQYJA/NXmwRdY2W ELG+Ego24Tm1PiFOYCn1n1Ti1WxmTx0xiBxyMzJ11CkdI7bNnlAxI471ey6CakYa3J4ATlK8AE8 ItbsuOlPNGqqe0yIt7rH0g7H3mbeXSw6JFsk40X3OS/SzIeocjT9SMBJBUe/tlZtYZAt3EOpWLX 31VsXRNfJih9bwX6faL/t+6EKr+BO5CUPxXuKe3XiG6plFfBUurIWEFtRfK1FqDyRF5I8qxTEGJ 2t2s/W3L7W2w15Q== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 A few new MPJoinSynTx MIB counters have been added in a previous commit. They are being validated here in mptcp_join.sh selftest, each time the number of received MPJ are checked. Most of the time, the number of sent SYN+MPJ is the same as the received ones. But sometimes, there are more, because there are dropped, or there are errors. While at it, the "no MPC reuse with single endpoint" subtest has been modified to force a bind() error. Signed-off-by: Matthieu Baerts (NGI0) --- Notes: - v3: - Force a bind error (Geliang) - Validate join tx with rx ones. (Geliang) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 84 +++++++++++++++++++++= ---- 1 file changed, 73 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index b10bcb1ac970..23ea8acb7a36 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -1331,6 +1331,54 @@ chk_infi_nr() fi } =20 +chk_join_tx_nr() +{ + local syn_tx=3D${join_syn_tx:-${syn_nr}} + local create=3D${join_create_err:-0} + local bind=3D${join_bind_err:-0} + local connect=3D${join_connect_err:-0} + local rc=3D${KSFT_PASS} + local count + + count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtMPJoinSynTx") + if [ -z "$count" ]; then + rc=3D${KSFT_SKIP} + elif [ "$count" !=3D "$syn_tx" ]; then + rc=3D${KSFT_FAIL} + print_check "syn tx" + fail_test "got $count JOIN[s] syn tx expected $syn_tx" + fi + + count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtMPJoinSynTxCreatSkErr") + if [ -z "$count" ]; then + rc=3D${KSFT_SKIP} + elif [ "$count" !=3D "$create" ]; then + rc=3D${KSFT_FAIL} + print_check "syn tx create socket error" + fail_test "got $count JOIN[s] syn tx create socket error expected $creat= e" + fi + + count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtMPJoinSynTxBindErr") + if [ -z "$count" ]; then + rc=3D${KSFT_SKIP} + elif [ "$count" !=3D "$bind" ]; then + rc=3D${KSFT_FAIL} + print_check "syn tx bind error" + fail_test "got $count JOIN[s] syn tx bind error expected $bind" + fi + + count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtMPJoinSynTxConnectErr") + if [ -z "$count" ]; then + rc=3D${KSFT_SKIP} + elif [ "$count" !=3D "$connect" ]; then + rc=3D${KSFT_FAIL} + print_check "syn tx connect error" + fail_test "got $count JOIN[s] syn tx connect error expected $connect" + fi + + print_results "join Tx" ${rc} +} + chk_join_nr() { local syn_nr=3D$1 @@ -1385,6 +1433,8 @@ chk_join_nr() =20 print_results "join Rx" ${rc} =20 + chk_join_tx_nr + if $validate_checksum; then chk_csum_nr $csum_ns1 $csum_ns2 chk_fail_nr $fail_nr $fail_nr @@ -1925,9 +1975,11 @@ subflows_error_tests() pm_nl_set_limits $ns1 0 1 pm_nl_set_limits $ns2 0 1 pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow + pm_nl_add_endpoint $ns2 10.0.12.2 flags subflow speed=3Dslow \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 0 0 0 + join_bind_err=3D1 \ + chk_join_nr 0 0 0 fi =20 # multiple subflows, with subflow creation error @@ -1939,7 +1991,8 @@ subflows_error_tests() pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow speed=3Dslow \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 1 1 1 + join_syn_tx=3D2 \ + chk_join_nr 1 1 1 fi =20 # multiple subflows, with subflow timeout on MPJ @@ -1951,7 +2004,8 @@ subflows_error_tests() pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow speed=3Dslow \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 1 1 1 + join_syn_tx=3D2 \ + chk_join_nr 1 1 1 fi =20 # multiple subflows, check that the endpoint corresponding to @@ -1972,7 +2026,8 @@ subflows_error_tests() =20 # additional subflow could be created only if the PM select # the later endpoint, skipping the already used one - chk_join_nr 1 1 1 + join_syn_tx=3D2 \ + chk_join_nr 1 1 1 fi } =20 @@ -2058,7 +2113,8 @@ signal_address_tests() pm_nl_add_endpoint $ns1 10.0.14.1 flags signal pm_nl_set_limits $ns2 3 3 run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 1 1 1 + join_syn_tx=3D3 \ + chk_join_nr 1 1 1 chk_add_nr 3 3 fi =20 @@ -2226,7 +2282,8 @@ add_addr_timeout_tests() pm_nl_set_limits $ns2 2 2 speed=3D10 \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 1 1 1 + join_syn_tx=3D2 \ + chk_join_nr 1 1 1 chk_add_nr 8 0 fi } @@ -2326,7 +2383,8 @@ remove_tests() pm_nl_set_limits $ns2 2 2 addr_nr_ns1=3D-3 speed=3D10 \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 1 1 1 + join_syn_tx=3D2 join_connect_err=3D1 \ + chk_join_nr 1 1 1 chk_add_nr 3 3 chk_rm_nr 3 1 invert chk_rst_nr 0 0 @@ -2391,7 +2449,8 @@ remove_tests() pm_nl_set_limits $ns2 3 3 addr_nr_ns1=3D-8 speed=3Dslow \ run_tests $ns1 $ns2 10.0.1.1 - chk_join_nr 1 1 1 + join_syn_tx=3D3 \ + chk_join_nr 1 1 1 chk_add_nr 3 3 chk_rm_nr 3 1 invert chk_rst_nr 0 0 @@ -3619,7 +3678,8 @@ endpoint_tests() =20 mptcp_lib_kill_wait $tests_pid =20 - chk_join_nr 3 3 3 + join_syn_tx=3D4 \ + chk_join_nr 3 3 3 chk_rm_nr 1 1 fi =20 @@ -3654,7 +3714,8 @@ endpoint_tests() chk_mptcp_info subflows 2 subflows 2 mptcp_lib_kill_wait $tests_pid =20 - chk_join_nr 3 3 3 + join_connect_err=3D1 \ + chk_join_nr 3 3 3 chk_add_nr 4 4 chk_rm_nr 2 1 invert fi @@ -3685,7 +3746,8 @@ endpoint_tests() wait_mpj $ns2 mptcp_lib_kill_wait $tests_pid =20 - chk_join_nr 2 2 2 + join_syn_tx=3D3 join_connect_err=3D1 \ + chk_join_nr 2 2 2 chk_add_nr 2 2 chk_rm_nr 1 0 invert fi --=20 2.45.2 From nobody Wed Dec 4 18:54:31 2024 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 E15D41BE873 for ; Tue, 6 Aug 2024 11:19:11 +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=1722943152; cv=none; b=NOI9JIVniF/sdyWd7wCFUght07laGGjMt9aYGPZ1WFr656+JxPUXLgqxsm4G3xomxfi/foMMyPEHZ/LmMBYGN3hk3519WRF+po8iM7VecyFN0BBUvdraYnZt4D4mpxvitDmk7EEPZV3xtd8jWtjImo5wHs64AHaWwNpPTThNWLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722943152; c=relaxed/simple; bh=ntv4ERciK31UQ3wl2w2eOgt9Q6p8SmLNF8w8ZzDLTQ8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QX5I1TrODb82bShLzCAmqtsUbSxTy+j1/jf+b9qtrEy8OOnlOh99RYX+d2Wti2DyGF7A3avC2izR5KymPhSCeY9chpddhXf1KX1ena4cDXbaaopMbO1AEul4rY7jPlRBFLh5B/jdSUnG1wXAJ3bKxMf6Iw18mVuo10QIVNz3Kgs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QPyDB4I3; 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="QPyDB4I3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA160C32786; Tue, 6 Aug 2024 11:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722943151; bh=ntv4ERciK31UQ3wl2w2eOgt9Q6p8SmLNF8w8ZzDLTQ8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QPyDB4I34mRX2GhJ6qhpSpKmMVkfcMqeQsFi0O5EMJ0xEhRHm3z11HPWNRRy3q8eJ Zt3KCxxzX6j4pstUScotorDfzLcls/DcQcTENXqjI3W1+FWrqfJQEMDyzTo+t4OuHI k81OOezKdRVZ7tmWrvzyLqZCIS18LMqXH5DRs4Q+y8Rpe3Br+IJg8bmytz9W2SJjay O/eNTWZMlR/6UNGrpuqDJOAYFUEaTRqwOFS44JQUS3+QyshKUhjtJf/yNXAeklG/Ae D+Mzq9lr1CR3tLvKT9RL6yUoC52sKTFcuz5dVtCnKIga71M88+2CFVaL9a1seQO+Om TNod9XRpEyqsQ== From: "Matthieu Baerts (NGI0)" Date: Tue, 06 Aug 2024 13:18:54 +0200 Subject: [PATCH mptcp-next v3 6/8] selftests: mptcp: join: more explicit check name 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: <20240806-mptcp-join-tx-mib-v3-6-c3b54d2099e9@kernel.org> References: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> In-Reply-To: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> To: mptcp@lists.linux.dev Cc: "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=7602; i=matttbe@kernel.org; h=from:subject:message-id; bh=ntv4ERciK31UQ3wl2w2eOgt9Q6p8SmLNF8w8ZzDLTQ8=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmsgaoDHQ9p29VSLtxlTKvez3kC0QitOndhvQrz C2pUhQpHPqJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZrIGqAAKCRD2t4JPQmmg c2LwEACd0HRzAV+vOQ1e0PPMp2eQ+qjqura4trZS4uiBsznQGJ+qy0TsjbP32BdgI+isrRZvsmJ x7LWyplEk1DLF87MsQHBTkfmiaqjkPgkMTMBth3tUD+MNSxyJSY0kCyBZ0arfV4ggdHuI0XMLci c6dmqF5y34aKC6j4AWy53fz6AD35bYCrOkXYMTqESfvQTwOg3/FAGBiJfanwzXvVkOOLhxvZ/qP 3byufGzstAGq2vmebScZuOleBA3Hubw4OUwK0mbI/dL1QA7eWsQormNH7QwjhDBzrwAe57uxsp5 PZRTwzv8BMIWlraG9RQLxFMHjJtmvMjEirHcpSmbNzxje6gJeCi8O67+01X8xFElaWYuXc32McJ Sj7/6bkBk9LUZGqOhw/105h7DUgm62W7ugcNQ0ESKwWGmUpiGbFwYsYqsj1vSZB4cMWAWC4egV6 qNgORyZo025yMEjdaHBwf6eWeIiyIqSViMZRc9UY4JfCdpzd05GZhoec+aoWcjU9cckeNMJ76sW kSO2zoaRIXGMYswokjatpEiEvDu3zhZ4T/9JgRQ/lP6X5We2macNEC1xMXX4qSbnU6AOMoOdDKD KC3n+fdsOsCvj1oKHZ12d7m0iGLIVj/xGrnGauDVpk2n9yxrKJPN/J9YQV5/8xZJhdEH7+90qfP SbRznxDg8wAmueA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Before, the check names had to be very short. It is no longer the case now that these checks are printed on a dedicated line. Then, it looks better to have more explicit names. Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 59 +++++++++++++--------= ---- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 23ea8acb7a36..46e8e43c4a54 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -856,7 +856,7 @@ chk_cestab_nr() local cestab=3D$2 local count =20 - print_check "cestab $cestab" + print_check "currently established: $cestab" count=3D$(mptcp_lib_get_counter ${ns} "MPTcpExtMPCurrEstab") if [ -z "$count" ]; then print_skip @@ -1132,7 +1132,7 @@ chk_csum_nr() csum_ns2=3D${csum_ns2:1} fi =20 - print_check "sum" + print_check "checksum server" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtDataCsumErr") if [ -n "$count" ] && [ "$count" !=3D "$csum_ns1" ]; then extra_msg+=3D" ns1=3D$count" @@ -1145,7 +1145,8 @@ chk_csum_nr() else print_ok fi - print_check "csum" + + print_check "checksum client" count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtDataCsumErr") if [ -n "$count" ] && [ "$count" !=3D "$csum_ns2" ]; then extra_msg+=3D" ns2=3D$count" @@ -1189,7 +1190,7 @@ chk_fail_nr() fail_rx=3D${fail_rx:1} fi =20 - print_check "ftx" + print_check "fail tx" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPFailTx") if [ -n "$count" ] && [ "$count" !=3D "$fail_tx" ]; then extra_msg+=3D",tx=3D$count" @@ -1203,7 +1204,7 @@ chk_fail_nr() print_ok fi =20 - print_check "failrx" + print_check "fail rx" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPFailRx") if [ -n "$count" ] && [ "$count" !=3D "$fail_rx" ]; then extra_msg+=3D",rx=3D$count" @@ -1236,7 +1237,7 @@ chk_fclose_nr() extra_msg=3D"invert" fi =20 - print_check "ctx" + print_check "fast close tx" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPFastcloseTx") if [ -z "$count" ]; then print_skip @@ -1247,7 +1248,7 @@ chk_fclose_nr() print_ok fi =20 - print_check "fclzrx" + print_check "fast close rx" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPFastcloseRx") if [ -z "$count" ]; then print_skip @@ -1277,7 +1278,7 @@ chk_rst_nr() extra_msg=3D"invert" fi =20 - print_check "rtx" + print_check "reset tx" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPRstTx") if [ -z "$count" ]; then print_skip @@ -1289,7 +1290,7 @@ chk_rst_nr() print_ok fi =20 - print_check "rstrx" + print_check "reset rx" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPRstRx") if [ -z "$count" ]; then print_skip @@ -1310,7 +1311,7 @@ chk_infi_nr() local infi_rx=3D$2 local count =20 - print_check "itx" + print_check "infi tx" count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtInfiniteMapTx") if [ -z "$count" ]; then print_skip @@ -1320,7 +1321,7 @@ chk_infi_nr() print_ok fi =20 - print_check "infirx" + print_check "infi rx" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtInfiniteMapRx") if [ -z "$count" ]; then print_skip @@ -1403,7 +1404,7 @@ chk_join_nr() rc=3D${KSFT_SKIP} elif [ "$count" !=3D "$syn_nr" ]; then rc=3D${KSFT_FAIL} - print_check "syn" + print_check "syn rx" fail_test "got $count JOIN[s] syn expected $syn_nr" fi =20 @@ -1417,7 +1418,7 @@ chk_join_nr() # the subflow creation if [ "$with_cookie" !=3D 2 ] || [ "$count" -le "$syn_ack_nr" ] || [ "$co= unt" -gt "$syn_nr" ]; then rc=3D${KSFT_FAIL} - print_check "synack" + print_check "synack rx" fail_test "got $count JOIN[s] synack expected $syn_ack_nr" fi fi @@ -1427,7 +1428,7 @@ chk_join_nr() rc=3D${KSFT_SKIP} elif [ "$count" !=3D "$ack_nr" ]; then rc=3D${KSFT_FAIL} - print_check "ack" + print_check "ack rx" fail_test "got $count JOIN[s] ack expected $ack_nr" fi =20 @@ -1507,7 +1508,7 @@ chk_add_nr() =20 timeout=3D$(ip netns exec ${ns_tx} sysctl -n net.mptcp.add_addr_timeout) =20 - print_check "add" + print_check "add addr rx" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtAddAddr") if [ -z "$count" ]; then print_skip @@ -1519,7 +1520,7 @@ chk_add_nr() print_ok fi =20 - print_check "echo" + print_check "add addr echo rx" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtEchoAdd") if [ -z "$count" ]; then print_skip @@ -1530,7 +1531,7 @@ chk_add_nr() fi =20 if [ $port_nr -gt 0 ]; then - print_check "pt" + print_check "add addr rx with port" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtPortAdd") if [ -z "$count" ]; then print_skip @@ -1540,7 +1541,7 @@ chk_add_nr() print_ok fi =20 - print_check "syn" + print_check "syn rx port" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPJoinPortSynRx") if [ -z "$count" ]; then print_skip @@ -1551,7 +1552,7 @@ chk_add_nr() print_ok fi =20 - print_check "synack" + print_check "synack rx port" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPJoinPortSynAckRx") if [ -z "$count" ]; then print_skip @@ -1562,7 +1563,7 @@ chk_add_nr() print_ok fi =20 - print_check "ack" + print_check "ack rx port" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPJoinPortAckRx") if [ -z "$count" ]; then print_skip @@ -1573,7 +1574,7 @@ chk_add_nr() print_ok fi =20 - print_check "syn" + print_check "syn rx port mismatch" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMismatchPortSynRx") if [ -z "$count" ]; then print_skip @@ -1584,7 +1585,7 @@ chk_add_nr() print_ok fi =20 - print_check "ack" + print_check "ack rx port mismatch" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMismatchPortAckRx") if [ -z "$count" ]; then print_skip @@ -1608,7 +1609,7 @@ chk_add_tx_nr() =20 timeout=3D$(ip netns exec $ns1 sysctl -n net.mptcp.add_addr_timeout) =20 - print_check "add TX" + print_check "add addr tx" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtAddAddrTx") if [ -z "$count" ]; then print_skip @@ -1620,7 +1621,7 @@ chk_add_tx_nr() print_ok fi =20 - print_check "echo TX" + print_check "add addr echo tx" count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtEchoAddTx") if [ -z "$count" ]; then print_skip @@ -1658,7 +1659,7 @@ chk_rm_nr() extra_msg=3D"invert" fi =20 - print_check "rm" + print_check "rm addr rx" count=3D$(mptcp_lib_get_counter ${addr_ns} "MPTcpExtRmAddr") if [ -z "$count" ]; then print_skip @@ -1668,7 +1669,7 @@ chk_rm_nr() print_ok fi =20 - print_check "rmsf" + print_check "rm subflow" count=3D$(mptcp_lib_get_counter ${subflow_ns} "MPTcpExtRmSubflow") if [ -z "$count" ]; then print_skip @@ -1703,7 +1704,7 @@ chk_rm_tx_nr() { local rm_addr_tx_nr=3D$1 =20 - print_check "rm TX" + print_check "rm addr tx" count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtRmAddrTx") if [ -z "$count" ]; then print_skip @@ -1722,7 +1723,7 @@ chk_prio_nr() local mpj_syn_ack=3D$4 local count =20 - print_check "ptx" + print_check "mp_prio tx" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtMPPrioTx") if [ -z "$count" ]; then print_skip @@ -1732,7 +1733,7 @@ chk_prio_nr() print_ok fi =20 - print_check "prx" + print_check "mp_prio rx" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtMPPrioRx") if [ -z "$count" ]; then print_skip --=20 2.45.2 From nobody Wed Dec 4 18:54:31 2024 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 E296A1BE873 for ; Tue, 6 Aug 2024 11:19:12 +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=1722943153; cv=none; b=rgH/GlV1Kt9x2hAW0yNUbbUeemxLaOgub7JBz75FETrU6hmC6kxwKisMbbd1+ZzYw7JZfQDo9VlAUzbs7K6gtpR5eeheE/qodd63yP0R/oM+eRFjRS6fhnaKqaCi51+oP6we0aMg+QcTC+ML/ZVqm2Qz8ctJ0cZGbILwJ6ek7GM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722943153; c=relaxed/simple; bh=QeaN9eDa0KKA0O2ZrIdqGKGh8lIFJChW21TbQGBGwak=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YWFRTFf3anlixPGtN+Q7lxfRQcJXRKoxGxEgNTXlDpb5+wC4K12L+4ayK70jcv/T+Ui4/ASa75K/OE3dk5U7LI42a6UZDZ8QuHn5aGVOhU5hW/mofYQqppg1XKo3nFFLl0iHURd2MCwdGev9AhYHnR11r6g7RbwTfkFQH3r1kvY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NPfpia7P; 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="NPfpia7P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBE1FC4AF09; Tue, 6 Aug 2024 11:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722943152; bh=QeaN9eDa0KKA0O2ZrIdqGKGh8lIFJChW21TbQGBGwak=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=NPfpia7PWprtHVKq60g6Wns73N/mmTjlkOxAXwi7bJfgUqjRd+gX5ItDSjpxxAiDS /qLkMTIh3SZvt4gqolaSkFvTyLrY98dev4xnV0sQSI1HjDQFLJ7HhFdls1Xbf2l7J5 W0UEDVVDRDxWpyablXTwa4L3Wi/LgQKwAv0yMTlM9EP0Db5yD9pLiOKj9DYAkQwxgi /qanFvdRQWJB447FtEN6tVM6ItqoL27XnAXNUgJjYNWSZqI5PzrL2SRGO3oIeE+X7g pzcH6RELRDbezmzYyaMmCm5t3fIZ2VDXaFC/m8PZzoUoeqf0jVknB8XCEcAyyppNfr eOazZYYNv1m7w== From: "Matthieu Baerts (NGI0)" Date: Tue, 06 Aug 2024 13:18:55 +0200 Subject: [PATCH mptcp-next v3 7/8] selftests: mptcp: join: specify host being checked 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: <20240806-mptcp-join-tx-mib-v3-7-c3b54d2099e9@kernel.org> References: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> In-Reply-To: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> To: mptcp@lists.linux.dev Cc: "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=8676; i=matttbe@kernel.org; h=from:subject:message-id; bh=QeaN9eDa0KKA0O2ZrIdqGKGh8lIFJChW21TbQGBGwak=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmsgaorrAlFtxgrCqqBQ0MU7J8fhVHWkm3HkGgA 0J/jAavglyJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZrIGqAAKCRD2t4JPQmmg c0szD/9jdZD8UDwL8Wsq1zrv8FJIFCu0jFT0TDG6JUnZ1ayfwSIaI4Oafu/c6WAF+zRAQFc344a zhx7ifkcgNeUhxgK6/SGMuwKVtvdIlElGN89Tb7RUHK9nWriulMJ6biNhj/CvT49kGEF35e3wz/ r5SpG++gh75H0ZvAdojsNplUKmsoNdYLJU6iuwcvGnqJ3zxnl1GUD/wqYS9WHUCuA02VHXNZhqk 43UP+V01K7f+JC5h/csPtCd7w3XvRAtFNkuJYUgxxOFqHYyD1HK5qw5eKDhaSMjenEvUwtq893T pGyBc13EjIVkjxgEMKlQwVlnsaa/o2cY4/YUbmFR4nZHhS2CpPdtpThOPl/QD+KJkqzRdsL54hc EtfHW0GiDpPCKAVbW5LxZ3RlVa7guEsKuCxI4A6r3b/2Qrl7it222XZy4qLO4Wmq5vHEL4fjMdX XvX7ejWyrMWlyGspEpAlHlhGqwa+yXT7Pp277jUQJupRVSNabkuFqKIgrrQ8hKYgtX4hGDKNNx9 LPYhxNeOePBAQ/WDRZEswFXfCKWcs+8bTkTUTrmaYU9wgtyEqU8qUDCgE/hNAxrPir93D+3OWGn OUOWF2ffH50ajwEcJmo31q/waUKziSVGItM9HsGBtbAlPuIbSO/sZg5VeGMr5JJFKjToKSC5yug LhEh2pJhCTpVvEg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Instead of displaying 'invert' when looking at some events like MP_FAIL, MP_FASTCLOSE, MP_RESET, RM_ADDR, which is a bit vague because they are not traditionnaly sent from one side, the host being checked is now printed. For the ADD_ADDR, only display the host when it is the client sending it, which is more unusual. Also before, the 'invert' message was printed after a few checks, but it was not clear which ones exactly. Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 89 +++++++++++++--------= ---- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 46e8e43c4a54..a8c4d6c04823 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -1171,6 +1171,8 @@ chk_fail_nr() local count local ns_tx=3D$ns1 local ns_rx=3D$ns2 + local tx=3D"server" + local rx=3D"client" local extra_msg=3D"" local allow_tx_lost=3D0 local allow_rx_lost=3D0 @@ -1178,7 +1180,8 @@ chk_fail_nr() if [[ $ns_invert =3D "invert" ]]; then ns_tx=3D$ns2 ns_rx=3D$ns1 - extra_msg=3D"invert" + tx=3D"client" + rx=3D"server" fi =20 if [[ "${fail_tx}" =3D "-"* ]]; then @@ -1190,10 +1193,10 @@ chk_fail_nr() fail_rx=3D${fail_rx:1} fi =20 - print_check "fail tx" + print_check "fail tx ${tx}" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPFailTx") if [ -n "$count" ] && [ "$count" !=3D "$fail_tx" ]; then - extra_msg+=3D",tx=3D$count" + extra_msg+=3D" tx=3D$count" fi if [ -z "$count" ]; then print_skip @@ -1204,10 +1207,10 @@ chk_fail_nr() print_ok fi =20 - print_check "fail rx" + print_check "fail rx ${rx}" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPFailRx") if [ -n "$count" ] && [ "$count" !=3D "$fail_rx" ]; then - extra_msg+=3D",rx=3D$count" + extra_msg+=3D" rx=3D$count" fi if [ -z "$count" ]; then print_skip @@ -1229,37 +1232,35 @@ chk_fclose_nr() local count local ns_tx=3D$ns2 local ns_rx=3D$ns1 - local extra_msg=3D"" + local tx=3D"client" + local rx=3D"server" =20 if [[ $ns_invert =3D "invert" ]]; then ns_tx=3D$ns1 ns_rx=3D$ns2 - extra_msg=3D"invert" + tx=3D"server" + rx=3D"client" fi =20 - print_check "fast close tx" + print_check "fast close tx ${tx}" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPFastcloseTx") if [ -z "$count" ]; then print_skip elif [ "$count" !=3D "$fclose_tx" ]; then - extra_msg+=3D",tx=3D$count" fail_test "got $count MP_FASTCLOSE[s] TX expected $fclose_tx" else print_ok fi =20 - print_check "fast close rx" + print_check "fast close rx ${rx}" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPFastcloseRx") if [ -z "$count" ]; then print_skip elif [ "$count" !=3D "$fclose_rx" ]; then - extra_msg+=3D",rx=3D$count" fail_test "got $count MP_FASTCLOSE[s] RX expected $fclose_rx" else print_ok fi - - print_info "$extra_msg" } =20 chk_rst_nr() @@ -1270,15 +1271,17 @@ chk_rst_nr() local count local ns_tx=3D$ns1 local ns_rx=3D$ns2 - local extra_msg=3D"" + local tx=3D"server" + local rx=3D"client" =20 if [[ $ns_invert =3D "invert" ]]; then ns_tx=3D$ns2 ns_rx=3D$ns1 - extra_msg=3D"invert" + tx=3D"client" + rx=3D"server" fi =20 - print_check "reset tx" + print_check "reset tx ${tx}" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPRstTx") if [ -z "$count" ]; then print_skip @@ -1290,7 +1293,7 @@ chk_rst_nr() print_ok fi =20 - print_check "reset rx" + print_check "reset rx ${rx}" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPRstRx") if [ -z "$count" ]; then print_skip @@ -1301,8 +1304,6 @@ chk_rst_nr() else print_ok fi - - print_info "$extra_msg" } =20 chk_infi_nr() @@ -1311,7 +1312,7 @@ chk_infi_nr() local infi_rx=3D$2 local count =20 - print_check "infi tx" + print_check "infi tx client" count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtInfiniteMapTx") if [ -z "$count" ]; then print_skip @@ -1321,7 +1322,7 @@ chk_infi_nr() print_ok fi =20 - print_check "infi rx" + print_check "infi rx server" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtInfiniteMapRx") if [ -z "$count" ]; then print_skip @@ -1496,19 +1497,21 @@ chk_add_nr() local mis_ack_nr=3D0 local ns_tx=3D$ns1 local ns_rx=3D$ns2 - local extra_msg=3D"" + local tx=3D"" + local rx=3D"" local count local timeout =20 if [[ $ns_invert =3D "invert" ]]; then ns_tx=3D$ns2 ns_rx=3D$ns1 - extra_msg=3D"invert" + tx=3D" client" + rx=3D" server" fi =20 timeout=3D$(ip netns exec ${ns_tx} sysctl -n net.mptcp.add_addr_timeout) =20 - print_check "add addr rx" + print_check "add addr rx${rx}" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtAddAddr") if [ -z "$count" ]; then print_skip @@ -1520,7 +1523,7 @@ chk_add_nr() print_ok fi =20 - print_check "add addr echo rx" + print_check "add addr echo rx${tx}" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtEchoAdd") if [ -z "$count" ]; then print_skip @@ -1531,7 +1534,7 @@ chk_add_nr() fi =20 if [ $port_nr -gt 0 ]; then - print_check "add addr rx with port" + print_check "add addr rx with port${rx}" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtPortAdd") if [ -z "$count" ]; then print_skip @@ -1541,7 +1544,7 @@ chk_add_nr() print_ok fi =20 - print_check "syn rx port" + print_check "syn rx port${tx}" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPJoinPortSynRx") if [ -z "$count" ]; then print_skip @@ -1552,7 +1555,7 @@ chk_add_nr() print_ok fi =20 - print_check "synack rx port" + print_check "synack rx port${rx}" count=3D$(mptcp_lib_get_counter ${ns_rx} "MPTcpExtMPJoinPortSynAckRx") if [ -z "$count" ]; then print_skip @@ -1563,7 +1566,7 @@ chk_add_nr() print_ok fi =20 - print_check "ack rx port" + print_check "ack rx port${tx}" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMPJoinPortAckRx") if [ -z "$count" ]; then print_skip @@ -1574,7 +1577,7 @@ chk_add_nr() print_ok fi =20 - print_check "syn rx port mismatch" + print_check "syn rx port mismatch${tx}" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMismatchPortSynRx") if [ -z "$count" ]; then print_skip @@ -1585,7 +1588,7 @@ chk_add_nr() print_ok fi =20 - print_check "ack rx port mismatch" + print_check "ack rx port mismatch${tx}" count=3D$(mptcp_lib_get_counter ${ns_tx} "MPTcpExtMismatchPortAckRx") if [ -z "$count" ]; then print_skip @@ -1596,8 +1599,6 @@ chk_add_nr() print_ok fi fi - - print_info "$extra_msg" } =20 chk_add_tx_nr() @@ -1641,6 +1642,8 @@ chk_rm_nr() local count local addr_ns=3D$ns1 local subflow_ns=3D$ns2 + local addr=3D"server" + local subflow=3D"client" local extra_msg=3D"" =20 shift 2 @@ -1650,16 +1653,14 @@ chk_rm_nr() shift done =20 - if [ -z $invert ]; then - addr_ns=3D$ns1 - subflow_ns=3D$ns2 - elif [ $invert =3D "true" ]; then + if [ "$invert" =3D "true" ]; then addr_ns=3D$ns2 subflow_ns=3D$ns1 - extra_msg=3D"invert" + addr=3D"client" + subflow=3D"server" fi =20 - print_check "rm addr rx" + print_check "rm addr rx ${addr}" count=3D$(mptcp_lib_get_counter ${addr_ns} "MPTcpExtRmAddr") if [ -z "$count" ]; then print_skip @@ -1669,7 +1670,7 @@ chk_rm_nr() print_ok fi =20 - print_check "rm subflow" + print_check "rm subflow ${subflow}" count=3D$(mptcp_lib_get_counter ${subflow_ns} "MPTcpExtRmSubflow") if [ -z "$count" ]; then print_skip @@ -1683,7 +1684,7 @@ chk_rm_nr() count=3D$((count + cnt)) if [ "$count" !=3D "$rm_subflow_nr" ]; then suffix=3D"$count in [$rm_subflow_nr:$((rm_subflow_nr*2))]" - extra_msg+=3D" simult" + extra_msg=3D"simult" fi if [ $count -ge "$rm_subflow_nr" ] && \ [ "$count" -le "$((rm_subflow_nr *2 ))" ]; then @@ -1704,7 +1705,7 @@ chk_rm_tx_nr() { local rm_addr_tx_nr=3D$1 =20 - print_check "rm addr tx" + print_check "rm addr tx client" count=3D$(mptcp_lib_get_counter ${ns2} "MPTcpExtRmAddrTx") if [ -z "$count" ]; then print_skip @@ -1723,7 +1724,7 @@ chk_prio_nr() local mpj_syn_ack=3D$4 local count =20 - print_check "mp_prio tx" + print_check "mp_prio tx server" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtMPPrioTx") if [ -z "$count" ]; then print_skip @@ -1733,7 +1734,7 @@ chk_prio_nr() print_ok fi =20 - print_check "mp_prio rx" + print_check "mp_prio rx client" count=3D$(mptcp_lib_get_counter ${ns1} "MPTcpExtMPPrioRx") if [ -z "$count" ]; then print_skip --=20 2.45.2 From nobody Wed Dec 4 18:54:31 2024 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 98E6F1BE873 for ; Tue, 6 Aug 2024 11:19:13 +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=1722943153; cv=none; b=tpRGnmijMkLcoXTJjB9m51RtyDaqzdvzS20pr8veeeBYi4l2YRgJD0eIY/87d1+ckIs83BjqBCeF1SQ0tFvANNJPZkSbNs5S6sJVNJPAaBCeu6ICJlniQxz90SgG/8lqfKMih4kPeWMBDBhy9mJn1EFnQ3Wdhxbsm9p4lVrOPo8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722943153; c=relaxed/simple; bh=6RQNdbJkEwyjjByHCRGnwG7R7TBjuVOtTr/ai7jVFeU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=N40G1W8W2ttdj2VH9ZM0BF4qPjyAtZx9jRdf8im04ZRaM9wDCKQiA/fUWQ0Dq1YNqZeEuXwuzgS9sMWT14VnZmTMipNgNcUS9TjVPdjHDPXnZL1R86Ay2mamPyCXYOj28Znr4YLCUqxHWICMB/FNjEKrZcuMFnElPbHH9CoqSC8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DORDj6ly; 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="DORDj6ly" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC8D4C4AF0C; Tue, 6 Aug 2024 11:19:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722943153; bh=6RQNdbJkEwyjjByHCRGnwG7R7TBjuVOtTr/ai7jVFeU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DORDj6lyBt3uBLUlkNAacI19TfMpxyPQP3qR79jFthlTfs2Dyb0wDDgcgVIujqATW B9wQxZF0DrAqULFLZXaImFhSletVfK3C3oSmh/Lp4i7zI3WDgVNITsWQxAnhUyOtZw l+SQEi0CKKDA3xmBP0DZi7yTumV5fneGaNuepShp1WEv+m7uvwVz2hTapGrV4aTuSI PvoMQ/1obgZ/XwDLaqIhwB7V/nLL2PfLS9B4VqIdMqzFZHyxAnTT4wwoVhRaZ15xVN cxEx5solIFqaR76bJwDwVsni7qCtzIhNOWcju+R0Oi+vugF85arY2NSLRXkehjE2oz WDx+y8uTH1H0g== From: "Matthieu Baerts (NGI0)" Date: Tue, 06 Aug 2024 13:18:56 +0200 Subject: [PATCH mptcp-next v3 8/8] selftests: mptcp: join: mute errors when ran in the background 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: <20240806-mptcp-join-tx-mib-v3-8-c3b54d2099e9@kernel.org> References: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> In-Reply-To: <20240806-mptcp-join-tx-mib-v3-0-c3b54d2099e9@kernel.org> To: mptcp@lists.linux.dev Cc: "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4122; i=matttbe@kernel.org; h=from:subject:message-id; bh=6RQNdbJkEwyjjByHCRGnwG7R7TBjuVOtTr/ai7jVFeU=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmsgaovcd0hAsxo8sEjRR2afLAMn8CXslHCMxnt 7Qgl7C8y3OJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZrIGqAAKCRD2t4JPQmmg c4tqEACMs5/DPP1IHXi/LlmXX9WMjvVfz2Z0mkKI8XLjTjF07bK3wIFGkTRhXSXglWCLTuII9OH 0soD/ZIy9QPP+rs6h1bFWDPaHpbj/IK9b1Gfgz+dEmf2QXP171iOp/gJnuvtf5aj1yIXqI3aOs5 wGyOfq2FYdW9W26dEwly6Sj1UD8Raq4KUO5XwsphZefOEgDO1grlUwPy5uJRz8HkvrJ0mJg//Xt r1VA/GZrmpkGGe1ITqqBwwVmv4y81HzwjOf/Rf174wl9jky2EHdBhwtdyPvvVL/McSLl3p32EpK 7ERREQ8XKP5TU01sPeKjeuu7qp0wnv/oUBNYdn8jV+ZHkKw8PBSkM7AbLH8yZKaEqzPJ0zqpoIE UBVSUd+qHUztN+rE+V/tgjj+LySbIimxANp8jZc/EOtafNvSji6gPEw3w7LLhbOy9nOQioTRuQD szQzegzwrtdEuriJg/ay4Dve39nKKrJhorq/VTQWtZSvkFMgfbw+qjmuZN5RsX8muqxL6SLSKBK VyYDiijMRaUA5b3wP8eY+RTZmKKCS+vIbNLzKXKnqoCIuiKaA5klSq5ns0yM9aEitVjNZze6zyZ 28k7re1X7AnqWgXCKNq92UQSZLiw9O8OFBHVQc36OvDkZlvAAdNdYDPNFPl8oqZlqWWzxEUbD3B yIZwvz64e2V0kiA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 The test is supposed to be killed before the end, which will likely cause "Connection reset by peer" errors. It is confusing, especially because in case of real transfer errors, the test will not be marked as failed. But that's OK, there are many other tests checking that. Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 36 ++++++++++++---------= ---- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index a8c4d6c04823..6d9fe305c281 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3481,8 +3481,8 @@ userspace_tests() continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then set_userspace_pm $ns1 pm_nl_set_limits $ns2 2 2 - speed=3D5 \ - run_tests $ns1 $ns2 10.0.1.1 & + { speed=3D5 \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! wait_mpj $ns1 userspace_pm_add_addr $ns1 10.0.2.1 10 @@ -3516,8 +3516,8 @@ userspace_tests() continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then set_userspace_pm $ns2 pm_nl_set_limits $ns1 0 1 - speed=3D5 \ - run_tests $ns1 $ns2 10.0.1.1 & + { speed=3D5 \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! wait_mpj $ns2 userspace_pm_add_sf $ns2 10.0.3.2 20 @@ -3545,8 +3545,8 @@ userspace_tests() continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then set_userspace_pm $ns2 pm_nl_set_limits $ns1 0 1 - speed=3D5 \ - run_tests $ns1 $ns2 10.0.1.1 & + { speed=3D5 \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! wait_mpj $ns2 chk_mptcp_info subflows 0 subflows 0 @@ -3566,8 +3566,8 @@ userspace_tests() continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then set_userspace_pm $ns2 pm_nl_set_limits $ns1 0 1 - speed=3D5 \ - run_tests $ns1 $ns2 10.0.1.1 & + { speed=3D5 \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! wait_mpj $ns2 userspace_pm_add_sf $ns2 10.0.3.2 20 @@ -3590,8 +3590,8 @@ userspace_tests() continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then set_userspace_pm $ns1 pm_nl_set_limits $ns2 1 1 - speed=3D5 \ - run_tests $ns1 $ns2 10.0.1.1 & + { speed=3D5 \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! wait_mpj $ns1 userspace_pm_add_addr $ns1 10.0.2.1 10 @@ -3621,8 +3621,8 @@ endpoint_tests() pm_nl_set_limits $ns1 2 2 pm_nl_set_limits $ns2 2 2 pm_nl_add_endpoint $ns1 10.0.2.1 flags signal - speed=3Dslow \ - run_tests $ns1 $ns2 10.0.1.1 & + { speed=3Dslow \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! =20 wait_mpj $ns1 @@ -3646,8 +3646,8 @@ endpoint_tests() pm_nl_set_limits $ns1 0 2 pm_nl_set_limits $ns2 0 2 pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow - test_linkfail=3D4 speed=3D20 \ - run_tests $ns1 $ns2 10.0.1.1 & + { test_linkfail=3D4 speed=3D20 \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! =20 wait_mpj $ns2 @@ -3693,8 +3693,8 @@ endpoint_tests() pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal # broadcast IP: no packet for this address will be received on ns1 pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal - test_linkfail=3D4 speed=3D20 \ - run_tests $ns1 $ns2 10.0.1.1 & + { test_linkfail=3D4 speed=3D20 \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! =20 wait_mpj $ns2 @@ -3730,8 +3730,8 @@ endpoint_tests() # broadcast IP: no packet for this address will be received on ns1 pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal pm_nl_add_endpoint $ns2 10.0.3.2 id 3 flags subflow - test_linkfail=3D4 speed=3D20 \ - run_tests $ns1 $ns2 10.0.1.1 & + { test_linkfail=3D4 speed=3D20 \ + run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null local tests_pid=3D$! =20 wait_attempt_fail $ns2 --=20 2.45.2