From patchwork Tue Jan 14 18:03:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13939243 X-Patchwork-Delegate: kuba@kernel.org 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 3B5F3224890; Tue, 14 Jan 2025 18:03:27 +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=1736877809; cv=none; b=uwV9ACT4MYLmC2Cvi/SrvHoSJnfDIjPTVCewRGC6442kmVdJpCxB0OIP7T2Pd11XE7XEJrH10FvFtdClBTDWRd/NNn5ant3ynuDFt6YQkneLNk7Y2N/nF3Cti4SJyul1aeulx1CtC3vBjL4FtDOtxHSIRFKh3nfZfZr1uxJhYtI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736877809; c=relaxed/simple; bh=/b63IGbH+aHXEuEpHipqlQZiw/AdT73vujdQ3l36d+E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=esjuLY7ZXgYEojBu5Tdnw1O8NHZwcmz6zeChdNAm48tClM7EhmEuP5rIe0UvKq3MUKLAPARaC16I9gHnFhrwxax5BA2MKFSS7wGuFqmsg+YpmBevKeEeefcnfYgYXtiX+ae/2eHHaFtCRPcw/h7V2O7ks/yF7/xgjjaZXblxk6I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Yh85gC+k; 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="Yh85gC+k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC197C4CEE4; Tue, 14 Jan 2025 18:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736877807; bh=/b63IGbH+aHXEuEpHipqlQZiw/AdT73vujdQ3l36d+E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Yh85gC+kGk1luu2Q4/5QXVsiJVnYu00zigUQLda8r9HZy6mxD1VLLmuiVMHB/Z1ps 5RGLakHVe52MjiMvvGrt7ZuIr5g6FtM6aEKnaVWkOdwgtbtXroLesowp/7RsPU51Vt HnPpBtgRvcpHna6sWumleIytU66MfJ8N+z5nnz0OLAjmiln0duw6xU6yLiNBp8dkfB eRpVUYsVmuk9Qzvfyu2GzcJgmRBb2jU0PKkvLL/DobUPr0ono8nYoKGAzqkdxz7z1/ +ErC0zQPZjXg3aEzlpveq6WpQPTCu1FvXggBJTdpuVoJYi/zj+VEDO6MAX1ZCvjJ9+ nWRnLLDcw2bgw== From: "Matthieu Baerts (NGI0)" Date: Tue, 14 Jan 2025 19:03:11 +0100 Subject: [PATCH net-next 1/6] selftests: mptcp: simult_flows: unify errors msgs Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250114-net-next-mptcp-st-more-debug-err-v1-1-2ffb16a6cf35@kernel.org> References: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> In-Reply-To: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2675; i=matttbe@kernel.org; h=from:subject:message-id; bh=/b63IGbH+aHXEuEpHipqlQZiw/AdT73vujdQ3l36d+E=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnhqboaM5i5mtI9ikWTnu1wp1kA/LxAclN7NgM5 oB25ecrt7CJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZ4am6AAKCRD2t4JPQmmg czPNEACCjH89Q0eWe3LoqfQz97B5voQRiWjytmGBqqYKjEdZqjn40cgTg9Ykaob8ADBh+YWLV0v u0cux3ENLegsdInqH3knq29B9RIO8q4lEQyi9EOBanvm2dFZITWq83mlJTalvzjwKWfcKG4wjDb +Ks9GAwsFDi1Kg7N+GfmCcVfSOLp0XPK1gphaTFvHq5RA1Psrn41ToMESgC2yahq2ChkM065pfo 5f4FOryWZx8j/H5rlbUujzJWHPNdlB5UPbm9wJWwUW0ggaQP2kToEXeQVS1zgUrnZF3XWWhtVaB zbsDYzrXW+xPAwkqEzHnwMaQL5hFCh0/sJrZN8mXSta3uFCnqmkJJvR7y28V3vMx1vThamteRIu VcN6kIZja9fKWADh0xojBgO9AgFtFlJ5Hob2zosu6QFJd/0nUGI+NJgdbjNdUDyTJM347SVg2rI +TlVWcEFErHam2zSJbS5J2HtiZbNOoV1hA1Dp3l0Sjqc700mJ/gnZ8hJrl6diGVs5DkurdhbZfR d2Nm28DMAOq98Y0fmzX3GC8AvRvmvToP1ytSMOL5z+rQaKp2wZaQnEsuwVJ/exbG/7H4tnLGyNY h8Fi4+rIvCLT2t1g/2bj5Ao+mjlH3iyXf2eWZl2cM9En1Ci0yooc0TwWi7X6vVxyUAMMd0gvup0 SPNXLTycYh2Fx7w== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org In order to unify what is printed in case of error, similar to what is done in mptcp_connect.sh and mptcp_join.sh, it is interesting to do the following modifications in simult_flows.sh: - Print the rc errors at the end of the line. - Print the MIB counters. - Use the same ss options: add -M (MPTCP sockets) and -e (detailed socket information). While at it, also print of the 'max' time only in case of success, because 'mptcp_connect.c' will already print this info in case of error, e.g.: transfer slower than expected! runtime 11948 ms, expected 11921 ms Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/simult_flows.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index 8fa77c8e9b651171a34c89bfd5c9ded0288a5bde..e98e5907d52c2d0e9c0152efda82176861905cf1 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -155,6 +155,11 @@ do_transfer() sleep 1 fi + NSTAT_HISTORY=/tmp/${ns3}.nstat ip netns exec ${ns3} \ + nstat -n + NSTAT_HISTORY=/tmp/${ns1}.nstat ip netns exec ${ns1} \ + nstat -n + timeout ${timeout_test} \ ip netns exec ${ns3} \ ./mptcp_connect -jt ${timeout_poll} -l -p $port -T $max_time \ @@ -180,25 +185,31 @@ do_transfer() kill ${cappid_connector} fi + NSTAT_HISTORY=/tmp/${ns3}.nstat ip netns exec ${ns3} \ + nstat | grep Tcp > /tmp/${ns3}.out + NSTAT_HISTORY=/tmp/${ns1}.nstat ip netns exec ${ns1} \ + nstat | grep Tcp > /tmp/${ns1}.out + cmp $sin $cout > /dev/null 2>&1 local cmps=$? cmp $cin $sout > /dev/null 2>&1 local cmpc=$? - printf "%-16s" " max $max_time " if [ $retc -eq 0 ] && [ $rets -eq 0 ] && \ [ $cmpc -eq 0 ] && [ $cmps -eq 0 ]; then + printf "%-16s" " max $max_time " mptcp_lib_pr_ok cat "$capout" return 0 fi - mptcp_lib_pr_fail - echo "client exit code $retc, server $rets" 1>&2 + mptcp_lib_pr_fail "client exit code $retc, server $rets" echo -e "\nnetns ${ns3} socket stat for $port:" 1>&2 - ip netns exec ${ns3} ss -nita 1>&2 -o "sport = :$port" + ip netns exec ${ns3} ss -Menita 1>&2 -o "sport = :$port" + cat /tmp/${ns3}.out echo -e "\nnetns ${ns1} socket stat for $port:" 1>&2 - ip netns exec ${ns1} ss -nita 1>&2 -o "dport = :$port" + ip netns exec ${ns1} ss -Menita 1>&2 -o "dport = :$port" + cat /tmp/${ns1}.out ls -l $sin $cout ls -l $cin $sout From patchwork Tue Jan 14 18:03:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13939244 X-Patchwork-Delegate: kuba@kernel.org 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 D1E2520E331; Tue, 14 Jan 2025 18:03:31 +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=1736877811; cv=none; b=QcFSlRCtW0u3ZxowXZwe+suqQOdOylugZTvUOryocylS9T57RUR6rFA+3r8LRs1PsB6sjPE2wdFxMx63/4OZvBMWp1bVXsKH04yAzAYgZRV0N5hxPGl8C65sMqRVCm4DexwbFSOKZxYNjQI4YlFfKop3qO/xww/nU5NhtCHFJjk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736877811; c=relaxed/simple; bh=kr29P4FNAPGgFtp3WjPdDbg/ZxSETtaY2ULfj0zgqpA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qLFlfqLUEK1yfABssuubCEoId+kgq8Bdd0HzsVr+HqJAAjdX2VmWKcJ+n/PO5wi1zN+ENQtnVsNLsB0fQJCpwAdunAc/Phj6iLeUWYWciMYknzfVy61nMN26VpbsvArs1upeiIDoZWwxhd+6HRTf4yAqnlkoem/3CmOWohGbEJk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ts4DwxNx; 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="Ts4DwxNx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29A55C4CEF7; Tue, 14 Jan 2025 18:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736877811; bh=kr29P4FNAPGgFtp3WjPdDbg/ZxSETtaY2ULfj0zgqpA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ts4DwxNxw0u+I1PhrgRhrT3Kom8SwCbB2xUplF2q/T3ZAezKlSqLxNcEiJa8bNJF2 hj1NHo6t0ojm9V4yxxdV1l7xtQG1Z6E7T8SmwpPLeVONapLk5OP9lv+NRN+Lcogp0V +TmEgybWMrBR65LAmH/YLekPCYlXx2XacFa8qmP8bIe1uDRiEaf7GMUilDZsnJeCGu LJcWK4KJzwEpa7zAamkUBFAVtE+Yp9AwI6QMMobMH6rzpusAcbTOkB4QsRhVVYxP3P 0TkeL72lSPxQMd/Qj7ck9AAO/uxkpnfHi7ORC9y0nSaQOgLSFQtqMGwLY3aXvOPW89 Sdcs4usBHCB9A== From: "Matthieu Baerts (NGI0)" Date: Tue, 14 Jan 2025 19:03:12 +0100 Subject: [PATCH net-next 2/6] selftests: mptcp: sockopt: save nstat infos Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250114-net-next-mptcp-st-more-debug-err-v1-2-2ffb16a6cf35@kernel.org> References: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> In-Reply-To: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" , Geliang Tang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2103; i=matttbe@kernel.org; h=from:subject:message-id; bh=A64I+iarzXvYRTzZkj/AeFTqlCRNlqd0J/cTHt9/yMM=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnhqboKd2XGZjh03PmlYiLYJJf95j7hoXZGV1L9 7J7St8mtzOJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZ4am6AAKCRD2t4JPQmmg c+8REACW+Xj23yZRzSOtEhx+fzt2JIyoNmD5TZs61WrhL3gSVavdQqi8y+JuxfgVoVaWcnvD8m9 1F+UJjWFl+ksOPiwOA/EdOSQul0P88itHqpDStPKaIW+8Oa2PpIMSSC6R7dpEomlqTy4DPM2MPv M6v3pWguBRItbQnnc9Cjiyb+LnF7Mm8j9l7cgOtwsmgPee4CZFN51u+GrSOExd7nhJyD7AKb3ok B+jbyhpN1nDP5tqS15YNjtXhLy68TsTykmFHS2OXVwV+FtnGYzrwv7NWxQ17Qx7zaRIeHlwR+3E ZA54yjErqFZeFx//2aEDYPPwxgB29L7Fvr2/9dzuGEuum6LxC/m0+jarxUhT/4NZgVwuWt6XkDu gS3ofA9G2JS8TRNoRUVU/oHIij52xYfd/jNWOKnzLz7uOoGnQ9Zg+UU3wKw7A9Gk/HBqJMj+3Ep QbNMY0dD7EmqbdlHsZgto7JIPAzJWocPliFebln5ATH3nJWv4/c4x6nSJBiC5RzcUUlxEBtnMir 51N9Uu67VYoHeKfJtHliEFX5SJTeGuVgxOl+6OUAoLvNUiHWZc5rCPNg9lOBkswR/eitZuPmnEe HnU9hHGclK05b/Z9FB6CHo6MK2injlWLTpAMBSdU9kihYswvT6dj58QC4g6G59vYkwpkSslwyy6 T0Yyhap5ALuQeRA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org From: Geliang Tang Similar to the way nstat information is stored in mptcp_connect.sh and mptcp_join.sh scripts, this patch adds a similar way for mptcp_sockopt.sh and displays the nstat information when errors occur. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh index 5e8d5b83e2d092879efc179f1a450542be4e575e..9a78bfdc3d5e27fdf6859d34f8d313bd08dd4457 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh @@ -169,6 +169,11 @@ do_transfer() cmsg+=",TCPINQ" fi + NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ + nstat -n + NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \ + nstat -n + timeout ${timeout_test} \ ip netns exec ${listener_ns} \ $mptcp_connect -t ${timeout_poll} -l -M 1 -p $port -s ${srv_proto} -c "${cmsg}" \ @@ -189,14 +194,20 @@ do_transfer() wait $spid local rets=$? + NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ + nstat | grep Tcp > /tmp/${listener_ns}.out + NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \ + nstat | grep Tcp > /tmp/${connector_ns}.out + print_title "Transfer ${ip:2}" if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then mptcp_lib_pr_fail "client exit code $retc, server $rets" echo -e "\nnetns ${listener_ns} socket stat for ${port}:" 1>&2 ip netns exec ${listener_ns} ss -Menita 1>&2 -o "sport = :$port" - + cat /tmp/${listener_ns}.out echo -e "\nnetns ${connector_ns} socket stat for ${port}:" 1>&2 ip netns exec ${connector_ns} ss -Menita 1>&2 -o "dport = :$port" + cat /tmp/${connector_ns}.out mptcp_lib_result_fail "transfer ${ip}" From patchwork Tue Jan 14 18:03:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13939245 X-Patchwork-Delegate: kuba@kernel.org 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 3F9F220E331; Tue, 14 Jan 2025 18:03:34 +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=1736877815; cv=none; b=P/7GAE3Bv94d7ZWm02QJceb1AXKDlZDpUmdjC8M6p+WqhS4eNUplJhM5m250lJ419ZX8cT6SoR6Yj5HMxm3spMtlw7+o6xlx1UCg/drOeW/Ls4JUxhEwhkAX6DjoShWKg/9pPuyqAU8w3xAaFP60KtAlr2TSOb0Y6AUZX6PK0gg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736877815; c=relaxed/simple; bh=w65k6xWKRGI7/vKkidtlHojt0YJMPssm/vQtmg+j0tU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d2bmltkmTyd7hqdyrF9y2FMKwl/x0sl1uhLWzunN4bJpxspxnmD6tUSN5n28Vv50OSMjQvpnsDDNwtT6sodDrovyVdc/RWqxXqFBbKkXCUyMp1nz42k4jeJPB3CKMxXEQhPBu+n62o9ExlbR36iHpSAb/XpUl/Y4VMo3DYUUsDM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G5loTSv/; 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="G5loTSv/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC00EC4CEE6; Tue, 14 Jan 2025 18:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736877814; bh=w65k6xWKRGI7/vKkidtlHojt0YJMPssm/vQtmg+j0tU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=G5loTSv/Up+7fYpSsc7gloijv9DaEGSZlisNeG/najYR+0uf5SKuU8IN/nyeZbNkN s2U8eYAHSMpIcSivSLvMMxhicmcvCTqUaNDptQRQC7pxS5IIfJI+sukifqKG1/SW9l n3DCIzGmEF89bWIbReYQh6iwGRGhyfWtTOCXL930O+dR6TnrqrgXn4PxvPmmhUM2wY PVM8W/dAPtedOSkP86OzMo44D1n8Omw/OZGOJcfl8zaxQbHuV4tFOPakjpPeT+ZgYl pKSUlkhKXKxYWm9sLeDeMh38DIUxXWXBDx0w8rovFksS7fdDxr7zPacx7SdlwEupld /cW4JcRbODp7g== From: "Matthieu Baerts (NGI0)" Date: Tue, 14 Jan 2025 19:03:13 +0100 Subject: [PATCH net-next 3/6] selftests: mptcp: move stats info in case of errors to lib.sh Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250114-net-next-mptcp-st-more-debug-err-v1-3-2ffb16a6cf35@kernel.org> References: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> In-Reply-To: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5947; i=matttbe@kernel.org; h=from:subject:message-id; bh=w65k6xWKRGI7/vKkidtlHojt0YJMPssm/vQtmg+j0tU=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnhqboQdSYXyyo7TSphAlafnMjtTqYg2wZiVKvs f2u46l08deJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZ4am6AAKCRD2t4JPQmmg c5uiEADUnFzfXXi99WG5sIeiJ6keQey9ReeKMnX1B3wZjRc/3NV19HkSuqCiviKtVmbIqvwKb8+ jchAQ+WQ1LeFz4aNbg7t7ZFK0GS5X5n+qZcORJh3alE5SmZLfLmEcaLFeoCUOLnRgjqcotykz1J JT9jYUSOnceYLPkXG2/26M7aVL++RUtZH2+KPCHto0x+qqdvrAVQi8GJstMJVaPqBcEwDfP2ymE gkxekRuFcsZVgKhg+tn6r6gNrxaHPyLIo3Fjt4MJPOeDjou+vTIHPyXaGKzfCUmUAGWsgP7wXO4 Kmo1yLoy3kxWlNWCaHC/gpI9Lp9a+JEJnkRJ+FP2fgi/gxdo0MdZhwoW9mP1qDvPZtpodZK7ihW KGmhKKTYQkmWLQnKUNaXKoTcWLMoL9Nfaj88lFtXkMdcCV+YvQKKw2gXpqsq7bsHvC/nVfYaiQB PUzyB7A+80dsBPNFan/zBO8y6Yn+6OZ9P+LR8744G4ABscHWeK1Gn7symYbHNGwVUKtU1KEX3bC PIs5HAv7lswLzCuYRSV7Lc4aGYWvNG86L+Q+ziaVD8+q8Een+dgt6b4SDeG+myrVAxe4Q982fhd O8gU0x1+Il7pfxGdNxMcaTJ5yOSjFgABUqXkUh8tmAWgZFEtYLXc8QZHYq5B4BSssy3qz4h7m8h wBjUfb+lypnSxqg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org A few MPTCP selftests are using the same code to print stats in case of error. This code can then be moved to mptcp_lib.sh. No behaviour changes intended, except to print the error in red and to stderr, like most error messages. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 8 ++------ tools/testing/selftests/net/mptcp/mptcp_join.sh | 9 ++------- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 21 +++++++++++++++++++++ tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 8 ++------ tools/testing/selftests/net/mptcp/simult_flows.sh | 8 ++------ 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index b48b4e56826a9cfdb3501242b707ae2ebe29b220..bfdaecd0a6a0564020530345daf91bed296bc15c 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -445,12 +445,8 @@ do_transfer() printf "(duration %05sms) " "${duration}" if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then mptcp_lib_pr_fail "client exit code $retc, server $rets" - echo -e "\nnetns ${listener_ns} socket stat for ${port}:" 1>&2 - ip netns exec ${listener_ns} ss -Menita 1>&2 -o "sport = :$port" - cat /tmp/${listener_ns}.out - echo -e "\nnetns ${connector_ns} socket stat for ${port}:" 1>&2 - ip netns exec ${connector_ns} ss -Menita 1>&2 -o "dport = :$port" - [ ${listener_ns} != ${connector_ns} ] && cat /tmp/${connector_ns}.out + mptcp_lib_pr_err_stats "${listener_ns}" "${connector_ns}" "${port}" \ + "/tmp/${listener_ns}.out" "/tmp/${connector_ns}.out" echo cat "$capout" diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index c07e2bd3a315aac9c422fed85c3196ec46e060f7..13a3b68181ee14eb628a858e5738094c3c936b74 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -1039,13 +1039,8 @@ do_transfer() if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then fail_test "client exit code $retc, server $rets" - echo -e "\nnetns ${listener_ns} socket stat for ${port}:" 1>&2 - ip netns exec ${listener_ns} ss -Menita 1>&2 -o "sport = :$port" - cat /tmp/${listener_ns}.out - echo -e "\nnetns ${connector_ns} socket stat for ${port}:" 1>&2 - ip netns exec ${connector_ns} ss -Menita 1>&2 -o "dport = :$port" - cat /tmp/${connector_ns}.out - + mptcp_lib_pr_err_stats "${listener_ns}" "${connector_ns}" "${port}" \ + "/tmp/${listener_ns}.out" "/tmp/${connector_ns}.out" return 1 fi diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh index 975d4d4c862afff2e685e86dc08a892dbd09d783..91a1d3b76e664bd95fc36310ac2e2c89bfba1aa1 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -107,6 +107,27 @@ mptcp_lib_pr_info() { mptcp_lib_print_info "INFO: ${*}" } +# $1-2: listener/connector ns ; $3 port ; $4-5 listener/connector stat file +mptcp_lib_pr_err_stats() { + local lns="${1}" + local cns="${2}" + local port="${3}" + local lstat="${4}" + local cstat="${5}" + + echo -en "${MPTCP_LIB_COLOR_RED}" + { + printf "\nnetns %s (listener) socket stat for %d:\n" "${lns}" "${port}" + ip netns exec "${lns}" ss -Menita -o "sport = :${port}" + cat "${lstat}" + + printf "\nnetns %s (connector) socket stat for %d:\n" "${cns}" "${port}" + ip netns exec "${cns}" ss -Menita -o "dport = :${port}" + [ "${lstat}" != "${cstat}" ] && cat "${cstat}" + } 1>&2 + echo -en "${MPTCP_LIB_COLOR_RESET}" +} + # SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var can be set when validating all # features using the last version of the kernel and the selftests to make sure # a test is not being skipped by mistake. diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh index 9a78bfdc3d5e27fdf6859d34f8d313bd08dd4457..418a903c3a4d396bd733bf8b6f68b1447d4d1de3 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh @@ -202,12 +202,8 @@ do_transfer() print_title "Transfer ${ip:2}" if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then mptcp_lib_pr_fail "client exit code $retc, server $rets" - echo -e "\nnetns ${listener_ns} socket stat for ${port}:" 1>&2 - ip netns exec ${listener_ns} ss -Menita 1>&2 -o "sport = :$port" - cat /tmp/${listener_ns}.out - echo -e "\nnetns ${connector_ns} socket stat for ${port}:" 1>&2 - ip netns exec ${connector_ns} ss -Menita 1>&2 -o "dport = :$port" - cat /tmp/${connector_ns}.out + mptcp_lib_pr_err_stats "${listener_ns}" "${connector_ns}" "${port}" \ + "/tmp/${listener_ns}.out" "/tmp/${connector_ns}.out" mptcp_lib_result_fail "transfer ${ip}" diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index e98e5907d52c2d0e9c0152efda82176861905cf1..9c2a415976cbf7a0b56cd4b2fbdd36c9e1ef3c8c 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -204,12 +204,8 @@ do_transfer() fi mptcp_lib_pr_fail "client exit code $retc, server $rets" - echo -e "\nnetns ${ns3} socket stat for $port:" 1>&2 - ip netns exec ${ns3} ss -Menita 1>&2 -o "sport = :$port" - cat /tmp/${ns3}.out - echo -e "\nnetns ${ns1} socket stat for $port:" 1>&2 - ip netns exec ${ns1} ss -Menita 1>&2 -o "dport = :$port" - cat /tmp/${ns1}.out + mptcp_lib_pr_err_stats "${ns3}" "${ns1}" "${port}" \ + "/tmp/${ns3}.out" "/tmp/${ns1}.out" ls -l $sin $cout ls -l $cin $sout From patchwork Tue Jan 14 18:03:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13939246 X-Patchwork-Delegate: kuba@kernel.org 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 A43FF1FA8C2; Tue, 14 Jan 2025 18:03:38 +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=1736877818; cv=none; b=F7TFRjcJBYb/4VSBMo5z9pYkxS2pUbNfLuJTO++OAGcI6biSdWDuYpBet3ynme1gATadESgq7PS6k8yChhmGkFcfiqFwExuXe7GUjGmvrh6RxoVibe6UjUAB60YCNUw4MIbs/RdEsx18Q3Xt7ltvo+QZXOKYQDJRU7LrUdyrxs0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736877818; c=relaxed/simple; bh=y+CXAJdHDVT9Nx7wej8EeVQL11x+r7crzxcSKe6+QUY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HngC+Gly8oSc0BoxzWCHJ84F3gvjli+5YZb2Th31ddKdZTRfi1XnOMAh/nYrs4L0dbTawbeWA4daQWrAVrxjJKpnO+Jyu1m/FT6SPO7pf+zhB3QElemGsKY6/VhC2Usw95yT+S5gUnrg1RAAFocoVOgLe92iB6G9ETPfkDYm7w4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZD2sdydy; 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="ZD2sdydy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E64FC4CEDD; Tue, 14 Jan 2025 18:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736877818; bh=y+CXAJdHDVT9Nx7wej8EeVQL11x+r7crzxcSKe6+QUY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZD2sdydyZyCzzVjHWyWDXMh2kwlNgvVyLEbj0+vO38Oeo7WJSpJfPIB/wpXwjfTee DOWwrKqcyOvxvpTbYsVAzFr1AjBgW41t0zTEQuamHGEJ/kQ4JcM8UJb7ZMRkqd6/hK XAlyqg4KZe2hR85f36V901gkFnCsePYbBs+P+x6yN89+8MMABxJ+cj1IvbTemXhZqI Pj8aIF34lMZM9nhf5myFUp09JNVhtTAS9yuGvqd7uEjVx1YH0yAIOgQrLupS8zX47v teFvu0kig2bfk6AJoObPNv2I2WqVzaoORex0Y4i0mC0RSvjaXwQK3g7VqcYcEKlXXb 562hRkIh9AVYg== From: "Matthieu Baerts (NGI0)" Date: Tue, 14 Jan 2025 19:03:14 +0100 Subject: [PATCH net-next 4/6] selftests: mptcp: add -m with ss in case of errors Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250114-net-next-mptcp-st-more-debug-err-v1-4-2ffb16a6cf35@kernel.org> References: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> In-Reply-To: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1322; i=matttbe@kernel.org; h=from:subject:message-id; bh=y+CXAJdHDVT9Nx7wej8EeVQL11x+r7crzxcSKe6+QUY=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnhqboCZdKPhA1hKOI8CtsZszMsX5u9DgDrtMlN HgeuUKBg8GJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZ4am6AAKCRD2t4JPQmmg cxGLEACHuw1y7dZUUJ5xr+GwVWMdY+VUJ3zDbce5xEmSEbNqq0HHsoBmCIZpe5fJMF1j0VLinD6 B7R3p/qL2otqGCn9YElyt+i6YZ8kzB7bCvDiKi6m2DbtpUDvn/pJvp7bAuZlf6lBD2T/exMPNxx pvKiJ3rUBIfOYPD4BBYSRY+qpUVA4MOQmo6aZBV50iU/k0boKDA9Djz4ylr83by/sgNo3UcPmSu QIhyo+usv8mEm3YANRZpaY6scViw2q0HICjREf7U2rz3TqVdSHnJjO3N6ih0oDFM7h4X51XyyNt zg3xZAPMmpYje8cPByw45FJUr3sHOnDL1o+y09VPw45e8Uq0qDw8d/ApD9AAShuqtvQynC1oGTW ug2bZ4XQkHIpGGL5UBtBTDMDCMXj3ndgA2voeR/cOtV27Ai6b3suL46sXAiykzLzSA3fUK5q8Fm l2OWdXMHIQguOafio5yHgNUvSvKW3TsRLkyzNlCR9B6lFSWe++EIzQRlkF3LzeuafH44mIeVYZ0 Cimyueu05zmSjq83SzxYzeh5OYAC2cH59i6j6ROmZ7yZ6STST7ivJY8nXc/idrOxtHnWAiYbuVh 41ibR7TlsVa/FCeaykVyLf8wf59JUz/p8I/9NIi12jwesZ3huHaIVBm5R6El6DwtckrFDBykXTV xU28RUov3CWV1Lg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org Recently, we had an issue where getting info about the memory would have helped better understanding what went wrong. Let add it just in case for later. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh index 91a1d3b76e664bd95fc36310ac2e2c89bfba1aa1..051e289d79676c5feb9f46da67a08116548f4b47 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -118,11 +118,11 @@ mptcp_lib_pr_err_stats() { echo -en "${MPTCP_LIB_COLOR_RED}" { printf "\nnetns %s (listener) socket stat for %d:\n" "${lns}" "${port}" - ip netns exec "${lns}" ss -Menita -o "sport = :${port}" + ip netns exec "${lns}" ss -Menitam -o "sport = :${port}" cat "${lstat}" printf "\nnetns %s (connector) socket stat for %d:\n" "${cns}" "${port}" - ip netns exec "${cns}" ss -Menita -o "dport = :${port}" + ip netns exec "${cns}" ss -Menitam -o "dport = :${port}" [ "${lstat}" != "${cstat}" ] && cat "${cstat}" } 1>&2 echo -en "${MPTCP_LIB_COLOR_RESET}" From patchwork Tue Jan 14 18:03:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13939247 X-Patchwork-Delegate: kuba@kernel.org 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 E8544225785; Tue, 14 Jan 2025 18:03:41 +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=1736877822; cv=none; b=lb5ZbLxJ8fpcjRmz28edBF6+tqXuxv0TuyJrhr4TMQe7tupZrk8zi6qHLBjWtqhoFnnD32oDPBxHT8zI8ZKs6XEspYoQxT52PozdsC6AXUBfiqKudAqu0WtTSDuH+R07XZV8GY+D+Bkjjy6zaG3R6bKxvwUYkumbJpbjotEdz5c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736877822; c=relaxed/simple; bh=txZfXf0LdEubQEytQZHPcz62G7KPx882XPWtXcCYOwk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DJYNcRgadXHNcauYYzCe0WbqXyESnedVYnIa/mH0DkgUXy/7fBULpalftk0FSJWt5gt5zsjS0p1AR6bF1L9SPHGuXY0srrAS7YJnZe4sKaJkMJm06MTKLGV8antOjy8gA1bh+Vz1RmtDYxDjCkLo0J82P1YAqvNSRri+X4Zb8Os= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gjCayaiY; 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="gjCayaiY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E0FBC4CEE0; Tue, 14 Jan 2025 18:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736877821; bh=txZfXf0LdEubQEytQZHPcz62G7KPx882XPWtXcCYOwk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=gjCayaiY2OCLSbe4cyoef4y3/a5yU32CwPOlaCMCtL3TEo4b+74rqplKFbq5cuyPe zo6fBEGlzplLHBaYbBz3OdiDNklyglSnJkXVYMR8pLk2bDepBYmL2F8l3mGFMplv1p Z6crwd7kHpx3sBiVzzl3d8fjwhP7mkBmJbvnGTJrk4FRNpBBhEf2+cWS6H2TBK2L/j w/2M5gzUp0atTfIPesj8Ad8S2cvUtXNWTiZxH+G1cVJwDPuErmHJTWE8LsbY/FalEA igQSXbCQRKtHrDl/SWbd9SsF14OSM2ro6sd8ULjcJ/w1Mk45JQSBXFRBGlu4X9gRHp MMztFime0SHfw== From: "Matthieu Baerts (NGI0)" Date: Tue, 14 Jan 2025 19:03:15 +0100 Subject: [PATCH net-next 5/6] selftests: mptcp: connect: remove unused variable Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250114-net-next-mptcp-st-more-debug-err-v1-5-2ffb16a6cf35@kernel.org> References: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> In-Reply-To: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1102; i=matttbe@kernel.org; h=from:subject:message-id; bh=txZfXf0LdEubQEytQZHPcz62G7KPx882XPWtXcCYOwk=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnhqbo4zCngECBBc6Ypu9Bz2UiCyOSF0uW4bn6m B3T46b64AmJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZ4am6AAKCRD2t4JPQmmg c30OD/9QAuzpECAjdIWfPRuf/CXDIS7K/8KnIV+AkANbGdNi3Ajesk1L7UXBf8I4+D2egITVyTm c2Yd/kpIdTgrVrKNRaSVJf8nCP5CjDBaA8hkUXKNgufg8t3YWgleqlJRcdfHqzowSfA5+lo4AiB C5cxJ77nGCeRKQA2PJmxYxrUEC/ICeRL2YnAWCBuq3DT4pd7qL/TWJSFSGlSeMrJ+uXF/CBOwT8 7F4fn40JO8lnA2XdoMiq0B3DC1S9XfLiwM7kRe9jQQXBiEBl8uwgwaCQWQyxfY31+cIRlS1cb1O I/viREfoc7TXj5typY85DnDeKFCs+yWmMGWgFIoUV0EKVMw3Aa9Sj8SYXcFLJnx1Hx33uANG/w9 kF4vdwYZRHjqeef0muvTV9PRfByDL19LwKa86kU+OZv8n8QqhYLn9y1K9XuSuFha9S8SutrtMH4 1gOFVXewdHY+6H+KYbz3sCrQKdj0h7o/UX3lo3YcdT8mF1SWGXrwzKCKso+x3fi5LsYeBhH0k7P OkqGi0OI0IpV8QWk2OyatwPXRvRCZSAZENlQUgZdjJNKihrcSYKEUiWlWww7uetkr5MNRietR4q LPbXr79L/wizLT4MDlAbXtCFbQjvuBuccn+TmLLg809CIXDEESlHyL5YPFkP92G2a+R9DHkaqSy NXZZYPLA+MNJT0w== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org 'cin_disconnect' is used in run_tests_disconnect(), but not 'cout_disconnect', so it is safe to drop it. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index bfdaecd0a6a0564020530345daf91bed296bc15c..e508d356fcdaebbfb95750bba0fa834a8463e32a 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -137,7 +137,7 @@ TEST_GROUP="" #shellcheck disable=SC2317 cleanup() { - rm -f "$cin_disconnect" "$cout_disconnect" + rm -f "$cin_disconnect" rm -f "$cin" "$cout" rm -f "$sin" "$sout" rm -f "$capout" @@ -155,7 +155,6 @@ cin=$(mktemp) cout=$(mktemp) capout=$(mktemp) cin_disconnect="$cin".disconnect -cout_disconnect="$cout".disconnect trap cleanup EXIT mptcp_lib_ns_init ns1 ns2 ns3 ns4 From patchwork Tue Jan 14 18:03:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13939248 X-Patchwork-Delegate: kuba@kernel.org 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 3A8BE204596; Tue, 14 Jan 2025 18:03:44 +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=1736877825; cv=none; b=pCicZFcV13mvpA+na8tA5j61csdixSAWWq5V+TpMw7aG9QtB/U714JyEHLzR6gmmcwOOsHv/pyQFSxZsDAvB3aQFdkukjUvHTZySbKPWaEzPHISAWhuOjKwy1GRRfSyMERU61Ro8WVvdqJAPJrrGzkS+xsUMv7nJtMSW0SwgPJY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736877825; c=relaxed/simple; bh=9RqV9VOitD/yl/LHt5lao8q+RDNxnzlzwsxYtUPKLBE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cnXPBERsGoKhDSwn/9l7SKW9iMUozpeIZR7/TJltqx09g5BV2d70Iyj+WDYXt3LLGbkkKGOWKf5oNxLZOwQ6QIUDzZPT2GRDNrZNv+drKuqrwHDI2H3ctHBKOP7+WTKzk+rIoV0+OpLDwg1pyIT8nXIqS3WNC0TSwiyKuNwWQ40= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=No77RFiw; 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="No77RFiw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED01BC4CEE3; Tue, 14 Jan 2025 18:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736877824; bh=9RqV9VOitD/yl/LHt5lao8q+RDNxnzlzwsxYtUPKLBE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=No77RFiw/FlcF6wxAtqZY//+k75F9ZdyWrcHTfrXozl24vTz2sa8eE6l4EQWBbmN0 4sD772CxwUXFxCnzZhm2akLObQqZZqVPdBmNtdV0UXWt/u98lYZDAKZiGenZopX26a aiHeud+cldMs0fE8Dzc8BFEe0Q7z9is5ku9oxheq83qSvh5zyEfZSO0zz3QDy1mFm6 ejCJ7G8zybwZ90pDTkgW8vkB7ZLmOoYBbudjdptMCeP08+7UbBjsvUmUDkMtxK9QAm F/5aP3yUoII75VfMl0NTC9HcM0Glk6M/LLpwWa3Ivh99OQi6voP+OBtQVVRN+4hm2A o0un+CI5dihBw== From: "Matthieu Baerts (NGI0)" Date: Tue, 14 Jan 2025 19:03:16 +0100 Subject: [PATCH net-next 6/6] selftests: mptcp: connect: better display the files size Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250114-net-next-mptcp-st-more-debug-err-v1-6-2ffb16a6cf35@kernel.org> References: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> In-Reply-To: <20250114-net-next-mptcp-st-more-debug-err-v1-0-2ffb16a6cf35@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1451; i=matttbe@kernel.org; h=from:subject:message-id; bh=9RqV9VOitD/yl/LHt5lao8q+RDNxnzlzwsxYtUPKLBE=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnhqbohA5xIeuKa7zqzxe8lDHpqG3pwXCmqbw65 EYg/R7m6CqJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZ4am6AAKCRD2t4JPQmmg c5R1D/9tpJLn7hvzFt2nGluKO3ejHZEPXUDJP0D+z1+IOPNK1Jv05RTqcKhBHDoyyxJZQnjfWSf 0qZYy8NgmpMR7GwPYwJn1KVGCo/VLMHT24CgUq7r+FOUUg+Q036c+Vnw6N7L18ed75kaK5Ug9sN LKClD6vnBncvbTAM6BWPX/hO1XqTX+TvN6mkqJiUzCHxQ0gefPe0K3IkNewrwD9SFOyNdPtFf6V Pb1ABc+s4b9gkjyzVJ68Ikrkfq4chbKpNqPKMCdd+gMnSh69r0e33BkzwszuGH90OJXzJ4XqFrI 87WwbD5VW4lH9O4PNLLETR6nXQgCxAKYwGYzz4Fq0HwKfVa6upRI9DYbFz10ISgtYgQk37RfDWj tbOZajlwAUw+Ug1HwJ+QQgI7kqOG/03Eq0JzbyiQcHy0xZ9biFppO19V7FqWDhy7X6/hLBltYAX jETr1f94y8zl7NlZ49VVFvjVHiobzXfbkw6J1hG64D6HqEeFSi+lLAjk/M5VYBUp7zltr0JSA9t tlISgOr3Z6pfQrQUrbu0UhxP69qx++fhPUvO35mtKUFUrzuxQArIYBCkWJmJE5CiOHltf2YKBax orJ392Pc+tzqyWoeHH9YdzUx35huR/q+/TUyHvVEJ2UwYydNJtbY72h/CsbT6v4HmMSfAhzjsT3 hxi7xrQIQt31www== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org 'du' will print the name of the file, which was already displayed before, e.g. Created /tmp/tmp.UOyy0ghfmQ (size 4703740/tmp/tmp.UOyy0ghfmQ) containing data sent by client Created /tmp/tmp.xq3zvFinGo (size 1391724/tmp/tmp.xq3zvFinGo) containing data sent by server 'stat' can be used instead, to display this instead: Created /tmp/tmp.UOyy0ghfmQ (size 4703740 B) containing data sent by client Created /tmp/tmp.xq3zvFinGo (size 1391724 B) containing data sent by server So easier to spot the file sizes. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index e508d356fcdaebbfb95750bba0fa834a8463e32a..5e3c56253274a1f938d2ed9986c4290fcea8b96b 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -582,7 +582,7 @@ make_file() mptcp_lib_make_file $name 1024 $ksize dd if=/dev/urandom conv=notrunc of="$name" oflag=append bs=1 count=$rem 2> /dev/null - echo "Created $name (size $(du -b "$name")) containing data sent by $who" + echo "Created $name (size $(stat -c "%s" "$name") B) containing data sent by $who" } run_tests_lo()