From patchwork Fri Sep 6 18:46:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13794668 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 071051D04A4; Fri, 6 Sep 2024 18:46:25 +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=1725648386; cv=none; b=beO12lV1FlmjJYoYNjMXbk91DQRlhmsu7HUCJEIM5BckiaZb5w6jyaARpqh/MxdJYbnClvwP3TjYHzZLwLT54pqtWyljzu1EJajYN7lyYr3aQizxHoDuONs6vP8Vj1qJ0zPKCRQb8EHvHKTnI2H5Sxy828Dmi58BMFrGS6w40i4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725648386; c=relaxed/simple; bh=exlr1t1z8ANjogMu+0R8MvnEWUoNjycIDoP/fjhm3AQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VbNd8d2TTNE7snHxFBO2+M62B+1R4gSK6z/OQAPEx16SMHFpvLbLNS3fRX0BRuEfQ0j8Has1btSzn1JH1R++8g8FWBVmDVhaIQCx+DYxs5DW5FTDMxs1n5rsv4fAtJEkZxlH47H/vHgCrQ7lkyjrR477TsruJyrOxZ1/YWc+KwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u71UqES2; 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="u71UqES2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35BCCC4CECB; Fri, 6 Sep 2024 18:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725648385; bh=exlr1t1z8ANjogMu+0R8MvnEWUoNjycIDoP/fjhm3AQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=u71UqES2gVZnPej8AF81tfVCaK9URlnG/3Fc91SIn+/5SnW/zEphKlc6UGUcaEEao 077FcezwFn424Y45usfsWGki16UspBlzA0x6+KVHIq4fN7w3S/mqGPuseRkrDprCtR EUGzpd746ctko49FGbPF3LegABKWlGdbjZZ6xqnYJV8XwlHLymW3sAPYlGegMUvcGI BOGAl8Ri+g2wtLeftQgiUsmCN8N05DGJFE/C7DWmE60KcTgZpRJGwLq0Ji8YBep3kL Q8p70sDcsuU+clvE4mqKGWdU6smj+W8ReyDgyCTe/P3Lysuyals3zeOUA+ZdY9HkgL 7ZCCX9vl/bErA== From: "Matthieu Baerts (NGI0)" Date: Fri, 06 Sep 2024 20:46:07 +0200 Subject: [PATCH net-next v2 1/5] selftests: mptcp: lib: add time per subtests in TAP output Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240906-net-next-mptcp-ksft-subtest-time-v2-1-31d5ee4f3bdf@kernel.org> References: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> In-Reply-To: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2373; i=matttbe@kernel.org; h=from:subject:message-id; bh=exlr1t1z8ANjogMu+0R8MvnEWUoNjycIDoP/fjhm3AQ=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBm2037meuM/EqOZ/v7Lm5hMb+yiKG+L/Fcd3kGf OqSB4o/omOJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZttN+wAKCRD2t4JPQmmg c5tSD/0SiCP68FFhvW9bYRz03ZFtiykJJ1+txf5hNGyJPS2HS2Dlr4871msDEvXFIDwT0osgNIW +of5X7P09/e/tq49qiGyTE6D4gSP1oNnIhJC5SNArIEbs0SKnjNu3Dn44dVsk2vI7p+Cm0PK9rK bZ0uJUD/bgrroLpy/QKjQY7RqJtHtfJamHu+ix4+stQNNT37xEQmZgSec6CUx/IN4aFb57nOQGI +77W1AtypZTjRv6Fd41lIL2H+BOAOOj4xAlmNj4thyUakWhf87+T5YisCX025CNLGw9bIfplQFG cP9cvoyrrZlZCB+KIzrwlP8dirbLIkl2JJem0woJ2T1IbH6HPeRmK+67G57LThVu0Ilg2lA+tJA +R7ANx1OnyTVLz0JTX305K4teeCAA8rG5SVSU+U8r/NtyfUX86/UHK4eFrg29ZAxHSKIVNH2a6i CCe+a00lCbEa/hT4/R42Wpaj/qp61GlAw8OPo3KIGcb55Dghq42lzqnGtTtRj5DgoxZpsUqlEkt 7MyyCDGXy6PIIZtfXCb+3YHDco+eWPECam5XotBDZCYYLZ1swNaaQzHpHZvJgxhgu8Dxohe9uax J5X4Zh30qdMhU3845hmxeJNfx8YfKG5G1I17q3BmWP5/AZutdIiXiMZhffQiUWmu0LEeMttbFv1 CNevKPmTdyftLsQ== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 It adds 'time=ms' in the diagnostic data of the TAP output, e.g. ok 1 - pm_netlink: defaults addr list # time=9ms This addition is useful to quickly identify which subtests are taking a longer time than the others, or more than expected. Note that there are no specific formats to follow to show this time according to the TAP 13 [1], TAP 14 [2] and KTAP [3] specifications. Let's then define this one here. Link: https://testanything.org/tap-version-13-specification.html [1] Link: https://testanything.org/tap-version-14-specification.html [2] Link: https://docs.kernel.org/dev-tools/ktap.html [3] Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh index 4578a331041e..975d4d4c862a 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -29,6 +29,7 @@ declare -rx MPTCP_LIB_AF_INET6=10 MPTCP_LIB_SUBTESTS=() MPTCP_LIB_SUBTESTS_DUPLICATED=0 MPTCP_LIB_SUBTEST_FLAKY=0 +MPTCP_LIB_SUBTESTS_LAST_TS_MS= MPTCP_LIB_TEST_COUNTER=0 MPTCP_LIB_TEST_FORMAT="%02u %-50s" MPTCP_LIB_IP_MPTCP=0 @@ -205,6 +206,11 @@ mptcp_lib_kversion_ge() { mptcp_lib_fail_if_expected_feature "kernel version ${1} lower than ${v}" } +mptcp_lib_subtests_last_ts_reset() { + MPTCP_LIB_SUBTESTS_LAST_TS_MS="$(date +%s%3N)" +} +mptcp_lib_subtests_last_ts_reset + __mptcp_lib_result_check_duplicated() { local subtest @@ -219,13 +225,22 @@ __mptcp_lib_result_check_duplicated() { __mptcp_lib_result_add() { local result="${1}" + local time="time=" + local ts_prev_ms shift local id=$((${#MPTCP_LIB_SUBTESTS[@]} + 1)) __mptcp_lib_result_check_duplicated "${*}" - MPTCP_LIB_SUBTESTS+=("${result} ${id} - ${KSFT_TEST}: ${*}") + # not to add two '#' + [[ "${*}" != *"#"* ]] && time="# ${time}" + + ts_prev_ms="${MPTCP_LIB_SUBTESTS_LAST_TS_MS}" + mptcp_lib_subtests_last_ts_reset + time+="$((MPTCP_LIB_SUBTESTS_LAST_TS_MS - ts_prev_ms))ms" + + MPTCP_LIB_SUBTESTS+=("${result} ${id} - ${KSFT_TEST}: ${*} ${time}") } # $1: test name From patchwork Fri Sep 6 18:46:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13794669 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 D58601D47A2; Fri, 6 Sep 2024 18:46:28 +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=1725648389; cv=none; b=QZmRaWk9fua43dzM5hKjgAuIplWsmp73W1Dq/whBKlkvu44b7Bmxv5BBkvaFxjnJhPZvezQiu3g7/BInYh4smSxQUUXhupZ3UKy6UtATkSSTGoP6g6EbkzW2TejMuvPOeyLJhMx4wRZNxUXYb6HkUuV7odJTxWwEK9t+JPbRC7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725648389; c=relaxed/simple; bh=zXEnYXCgACDGfo7ZYt2ca6tuV3GlLu0vMdssd0apdYk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C0RT+GIsPd8Rdvs9KSeiynx64q1N28tk0cqLsUwSVjBlta7JZq8oTS+oQfpG0GPs0Gwcy5BQhQVJJTjrWlTRRiTYS3sUdYbx69TA07NFbr2rei94RpYQpXuMMBdODtj/HTF4vGUYdf8Jjc78H/bOijbXmWsW6hFYR+ymdsHzqqU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dyggxHX1; 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="dyggxHX1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07766C4CEC8; Fri, 6 Sep 2024 18:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725648388; bh=zXEnYXCgACDGfo7ZYt2ca6tuV3GlLu0vMdssd0apdYk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dyggxHX1hdmGjWT6qmq4X3tJ01YFPc/wkyW+RG4qcUYma/99IwWLvZqm6yg0BjR1I svcw319eWF29qXPx2NtZKuV8WKixZOP2AEEYKwZ6A/Ayk5c37gsIwHziOMtDIMH7YK 86AclcIplwAd2ZHHZh96Ekrk5h7lH0qm6P71KPiFqT/aEUosRF0axcsLi/nYF9/p38 7VsT1m9XCgwHlw+rwQxfCfxcpWWJY2RDtuQHqpR6ATb/gdd6OV4lz8anmAA1NJbHE4 YJchYpx6pX9c2tE/chT1fHIIW3oFU0tZnLonwND9iUBGa5+a0vCXm1r5VEcJGJ9BpW An2QwsgFFF/aQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 06 Sep 2024 20:46:08 +0200 Subject: [PATCH net-next v2 2/5] selftests: mptcp: connect: remote time in TAP output Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240906-net-next-mptcp-ksft-subtest-time-v2-2-31d5ee4f3bdf@kernel.org> References: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> In-Reply-To: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1014; i=matttbe@kernel.org; h=from:subject:message-id; bh=zXEnYXCgACDGfo7ZYt2ca6tuV3GlLu0vMdssd0apdYk=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBm2037EesQgSqwUmMCyycaUfga+sDuRiUcClMEU m7zZQdLKc+JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZttN+wAKCRD2t4JPQmmg c5wbEADgbkH58kRtpmtBHLlOjiZd4wgfiXKB9kKsCQyLsbARhOBK2tUqkmSM8A+lQkDgAVWiyDe vzyUtqLzCaJXGN2K0n/XY6W66zjTTqA5GdfftsJPRQxTcs/jqi5mW+EUmCOCPwZwJNziVmUg5Jc jeDg0kCg/blS9s21Z1LaaHiz2fo/1c4H9zuubehDPi3EZykh9Xk7gh6p8DE9RTrdU0Qk3kKNOqs CwZ1lkfWbs1TsktNUE3qxHrv/wMkQr6y9YXTAE+xTlgS4X7fCKuP7mhE68ZeoK5rlnlgWvZqme1 YHYbSGqNhMusG+Ivb5TS033wYVEAGxX13YkgYeC6ckH5dhVnMEBbZiPlERN/MWu10s3A3qLmkoR q7S7uMGehBWOP0thYe83YyIGVAeig2Oa0vaMwGdt6jUWfiVibXeXKkQv6AbBLqFLMNvRQXtlwUR DvphVgQArk8L/3Jiv7tQdOiUMMls9zgOECNMI1Umbbi79D4heKUSzxYOgyVYQkg81+ym65gV9cw sYIjc/iDRGG9xznrcKaqjkvMCSXXQL/xRAv29sZsuSjjoV+LbWv68DHbQWbxdHpgN7oQnzWVrx/ OLClcJ0Z4y09oP8HfTO1KPXGpIK+VyszkDtXzkO8qamhNiRe5uZK5H6DC6PONDa7Gf/NzrY+Ajd smskOdfUOabrZrw== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 It is now added by the MPTCP lib automatically, see the parent commit. The time in the TAP output might be slightly different from the one displayed before, but that's OK. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- v2: - Fixed typo in the commit message (Jakub) --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index b77fb7065bfb..f61e2f5870ea 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -431,7 +431,6 @@ do_transfer() local duration duration=$((stop-start)) - result_msg+=" # time=${duration}ms" printf "(duration %05sms) " "${duration}" if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then mptcp_lib_pr_fail "client exit code $retc, server $rets" From patchwork Fri Sep 6 18:46:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13794670 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 8BF3B1D6DDD; Fri, 6 Sep 2024 18:46: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=1725648391; cv=none; b=TDHbaVtYGDsoEF0htc84j0pzY6abSz6dP5v02ZCcNiGQoa1zvJ+SYskr9JK+qv1MZG5mJ+DBXxob9ny/axX2n4pH6dCeRN+WrjUey5sdUb4jfPFBPf5rIGgmsCiALSqQLApj824UOBx4ZxhfdO5Th8QzJA6bqfe6Bu9eHGM79q4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725648391; c=relaxed/simple; bh=e1LZMuO1zQTgYSCDSU0RSxNy+M19aD9bysgW3jUoe8Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=U5snR9asegDPKP1wtd1ZNR3w1fGyqxtRhJFvaywjkppe0kgzPDtE62nqet8zYFJ2Naa5b6VVf3ChPRhnuqh+AjAW6kkfStrTtArMyAJgHvLMm5uCtd+IC6Gke0qUsz5p0RgmQUeKq/Uj6OAkNEaKYOTHxXDhlhtVmzRqIlIktuY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fx+3/Gcw; 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="Fx+3/Gcw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD5BCC4CED1; Fri, 6 Sep 2024 18:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725648391; bh=e1LZMuO1zQTgYSCDSU0RSxNy+M19aD9bysgW3jUoe8Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Fx+3/Gcw/mBA1Zn52b5WgLiMDVvT7vrhCJVxNPRKcbMI7CPOOyFunnvzMKUcPp5MK QuSFPM6q4YQG8XEz6bk7eCXC6KEWJRaXBmp+XvSRWgSVvC2Iiis2imOCFKPlQJXiSu OLXDALxTVsryflEbX1plo/8JsNY1ymBlY42rsxtqWlOfn8SEaSpw81/JR3uhPWdsQC yV5EVO5UETWcERjsOFZ2ulpG03YIKDt49PiSo8uD5POHOC7wgBFj5aCYihk473Ze2e 4DlC/eaP+zdDILQMAYz4N65Kh/J5mxmUjjsTMN1N8hRJcB7YqpXZPCfRLzKqNEbhIW 3ey0REpEc6tYQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 06 Sep 2024 20:46:09 +0200 Subject: [PATCH net-next v2 3/5] selftests: mptcp: reset the last TS before the first test Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240906-net-next-mptcp-ksft-subtest-time-v2-3-31d5ee4f3bdf@kernel.org> References: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> In-Reply-To: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3916; i=matttbe@kernel.org; h=from:subject:message-id; bh=e1LZMuO1zQTgYSCDSU0RSxNy+M19aD9bysgW3jUoe8Q=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBm20375HHQbXcKTOOVq788vhuz9QzoF4Mh1l320 GMwFNhbtY+JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZttN+wAKCRD2t4JPQmmg c0GFD/4oPHFgCNiJmp6IXMNFGsNHmUhu2yejtyoiXFhA0+I/F1dgmws3LAl/Tx0+ngjwfShpLh4 xFDZHv1+cNWOa+TVGQCyUo8FtK6uwHMvA6Cto17K4ur5sRKLBeksqwyMrrs/a8iiHoU6Nhr7rZf kfVTO3Z4QOiqeMCzP+MO8JyKW3G21r+J1vq98gGgdQOh4ARo9yi2lbF/G4dGtZwrcmZSMFOt+83 HDKVkjOJSuY72F0jY3ESMfKZaV5iF3JAynOdozCs4FsSPCOoTe29Djq5JcSDl7qn4RWJP0bm01c dC3sVoUQe3f1YN5WEybeyfQBURNI2jn177HGdPY+VElxD+x5Sm3WDClaohrsXqyZGw0dRQ88Zd6 tdY+DKabUEEyZRV12bRr26oM4hchNFL4qA3IOyLn3G/2ekQvUZo3yBDItoVnm58D69fO+TOhS8j R+OMXUZKbcHvuPxLH2LrFQ5cpGajg0BrBf2I39JAUTYiSmlp42H50flg5PE4GEtBudIk4bE6tg1 LYI6gZP7AUlzhRamY+A/hPy3Xpw6rTW2UXHQE1oldn6mhXC/40/c2psAtzVhmM7olADn9L0Qu1K hBdKuFA+XjpyJSKM46aixgGvy1j+Wj8JVRwPso5vzh6cvgqeprUF07x7j7otcsX0TpRk0N/6mf/ 8dR3pYuxjE81Zsg== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 Just to slightly improve the precision of the duration of the first test. In mptcp_join.sh, the last append_prev_results is now done as soon as the last test is over: this will add the last result in the list, and get a more precise time for this last test. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 ++ tools/testing/selftests/net/mptcp/mptcp_join.sh | 3 ++- tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 1 + tools/testing/selftests/net/mptcp/pm_netlink.sh | 2 ++ tools/testing/selftests/net/mptcp/simult_flows.sh | 1 + tools/testing/selftests/net/mptcp/userspace_pm.sh | 1 + 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index f61e2f5870ea..49d90c4dbc01 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -847,6 +847,8 @@ stop_if_error() make_file "$cin" "client" make_file "$sin" "server" +mptcp_lib_subtests_last_ts_reset + check_mptcp_disabled stop_if_error "The kernel configuration is not valid for MPTCP" diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 43f8a9bd84c4..3564cd06643c 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3959,9 +3959,11 @@ if [ ${#tests[@]} -eq 0 ]; then tests=("${all_tests_names[@]}") fi +mptcp_lib_subtests_last_ts_reset for subtests in "${tests[@]}"; do "${subtests}" done +append_prev_results if [ ${ret} -ne 0 ]; then echo @@ -3972,7 +3974,6 @@ if [ ${ret} -ne 0 ]; then echo fi -append_prev_results mptcp_lib_result_print_all_tap exit $ret diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh index 68899a303a1a..5e8d5b83e2d0 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh @@ -349,6 +349,7 @@ init make_file "$cin" "client" 1 make_file "$sin" "server" 1 trap cleanup EXIT +mptcp_lib_subtests_last_ts_reset run_tests $ns1 $ns2 10.0.1.1 run_tests $ns1 $ns2 dead:beef:1::1 diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh index 2757378b1b13..2e6648a2b2c0 100755 --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh @@ -137,6 +137,8 @@ check() fi } +mptcp_lib_subtests_last_ts_reset + check "show_endpoints" "" "defaults addr list" default_limits="$(get_limits)" diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index f74e1c3c126d..8fa77c8e9b65 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -286,6 +286,7 @@ while getopts "bcdhi" option;do done setup +mptcp_lib_subtests_last_ts_reset run_test 10 10 0 0 "balanced bwidth" run_test 10 10 1 25 "balanced bwidth with unbalanced delay" diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index 9cb05978269d..3651f73451cf 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -150,6 +150,7 @@ mptcp_lib_events "${ns2}" "${client_evts}" client_evts_pid server_evts=$(mktemp) mptcp_lib_events "${ns1}" "${server_evts}" server_evts_pid sleep 0.5 +mptcp_lib_subtests_last_ts_reset print_title "Init" print_test "Created network namespaces ns1, ns2" From patchwork Fri Sep 6 18:46:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13794671 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 7197214A4C1; Fri, 6 Sep 2024 18:46: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=1725648394; cv=none; b=gDUSTIn4yqRY0EqnZD8cTcKZUrEOt++TIIHLu0pLQDKlXyNnKsGn4bAJ7rwn8bkbqCXWjogt0ez/SW/kiSD14ptMDXRwC13WsV6blNhEkV1ZA0HjSMhXLp7nHGgIc72XaLgBRdCTKUhotQwcaLYGY5mIiF1nJUNUKUhxBWTl5No= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725648394; c=relaxed/simple; bh=5veUrZt4a8truXcimSm6Y9QmQ92Ra0EaYasr2Zmdcgc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B0KqqSnfw6g7UhgN0lXC3za7ZScB1/FwMnyXlBD7NOQNJOiWQup3Jqdty4NJJEmJE6SQnmq8m30eu16MeqI604391/uYVPiw5fRqC7PEhR4BcN6c6Dec5cy9NHqgAy4TQ2p6HBKu4rvHwwuV23GiTvxD6VnN31MRxzgGm9S6RDo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OT/hBink; 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="OT/hBink" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EB16C4CEC9; Fri, 6 Sep 2024 18:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725648394; bh=5veUrZt4a8truXcimSm6Y9QmQ92Ra0EaYasr2Zmdcgc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OT/hBinkt1SwaFdXMRiJrkE6O95fr/MZnG7aRavFHY6V8YcZyptwh6T/eqvUrgRA+ SkMIlQVI4PUSbHVkRMKcORWVMPvmsmLhYsQg0xOURuHsS5aym4mWKAqXHmmZfYElPf aLxNUhDCMx84rDyHtNu1kGoTx4ncxXHU/In0E4ThUE5CpXzOW3EL8qdz5+KudSZ2EH Vy5BjgCYumzlVX0apBBneRFztGExj2nVW0XkYfXU6KP3ZmLs2jdi23w/oXzv1bqZNO jHmHB+FSs95RFe0lWJeXniYrL26HTf1kcm8av/xFi9tT6dtMiS6miRSbCjCX6PaxWt 0KIy/1/rBaiaA== From: "Matthieu Baerts (NGI0)" Date: Fri, 06 Sep 2024 20:46:10 +0200 Subject: [PATCH net-next v2 4/5] selftests: mptcp: diag: remove trailing whitespace Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240906-net-next-mptcp-ksft-subtest-time-v2-4-31d5ee4f3bdf@kernel.org> References: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> In-Reply-To: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=907; i=matttbe@kernel.org; h=from:subject:message-id; bh=5veUrZt4a8truXcimSm6Y9QmQ92Ra0EaYasr2Zmdcgc=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBm2038U18YSTE88hJT2LbLn/QOUBAEkygpSPs/D BQyRfr/WCeJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZttN/AAKCRD2t4JPQmmg c2kAD/0Z4zmbgu6NOXQVKkH9FtwVb5ARaIe5w4QnNPy+uc3drD1vodBA6wtynp08ypzo1BQRHaR OlIe0M8KlSeji/AlsvdeQcuaiUJa+/id5xnjKbHzWJ5RCkK4VS0TqIzreaiVa55EjTpE+T6CpAF Gu4kioWBU2SjqaN+Cvz+i+njx6R/uDCWts1z5NVseRZgCCKuAP5QvqZe/5fjJpK6LxkjNN2L67k WT4/IT5ivLVf87YAEeVl4wr7SIaUuX3cdBtBriyAcX0n82E3aBhs/5ySQS75eCXWHNfh21NVu49 fAykDey3aR/ggqkNDlmZMAjVCM3SbXRvpUGYFvCMltpTS51RYaCBkS4ZAN2IXHk506PuWLpLIrt k1RZ/wX/ki9wSn23LGEJHDrJr+enL4FP7Ija6yxjOmLlWDG9rhmnT96a4zx8MYAr/mw2C2mITGq +UzYLNp16DFMP6c0l97qfEFCGBLD0MKjKpxV3aq5I60StQAEPAQ7mohcQiC2fGeYkvcf4tYq39O 41v6YfY9wkqOkEesbJ+bjCLm9g7uNL3+mEt4gZGdGoZBkjWXSP94CL5928s5rFEcYzrgjLME28X vXMx0dIBwf2jGnHZICWvgQpJpwEdg/mKUiR0MATdaYw8G0X8TVeQqbHDdYZtdd8wyhZI/wE8CVj BKQdS24nUv4Azow== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 It doesn't need to be there, and it can cause some issues with TAP parsers expecting only one space around the directive delimiter (#). Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/diag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index 776d43a6922d..2bd0c1eb70c5 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -284,7 +284,7 @@ echo "b" | \ ./mptcp_connect -p 10000 -r 0 -t ${timeout_poll} -w 20 \ 127.0.0.1 >/dev/null & wait_connected $ns 10000 -chk_msk_nr 2 "after MPC handshake " +chk_msk_nr 2 "after MPC handshake" chk_last_time_info 10000 chk_msk_remote_key_nr 2 "....chk remote_key" chk_msk_fallback_nr 0 "....chk no fallback" From patchwork Fri Sep 6 18:46:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13794672 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 607EE1D88B0; Fri, 6 Sep 2024 18:46:36 +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=1725648397; cv=none; b=Pl0WKVoGEaANvAVVQ7wFCwHFjdp84zMHdJavKjRIXCQWnJtvpaxQcuO3j7GzKwTK/rSwRTYvKbAm/iB9HqprKkzy9ghntoYRneA6ekT0sijHi1DsXQTFqQRBlL6XCZoYsUkvKZKiT3Qu0d23YHi1ggGDTVqkNkLbUTvCi6sp6aU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725648397; c=relaxed/simple; bh=JIwD47ohgeR39/mflNfwm5sG7pceaysqE8PN4r4u3Js=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Wy04z4/LjMzHskSZBJUf/qQJQSsHZZU+TJxWWstuu+UD/1xS9QHYu5AmvD3CWq1cfGi8MSp/bIRc16gAjoM4at4QXJ/uJE5F8ewvgrrRHg5AZO1mFoWaZ2RCuZvlz6NnBANb4KfTxzHXkPH8hZ3Tc+PQLSWliUNtDOxtpA69R0c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AcbYC4wO; 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="AcbYC4wO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 727BFC4CEC4; Fri, 6 Sep 2024 18:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725648396; bh=JIwD47ohgeR39/mflNfwm5sG7pceaysqE8PN4r4u3Js=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=AcbYC4wO+Y/JAa5ZJseSYcmc6yWpZi04cpfcPjphuQHZYhYCQP7tOiMsW/+eRAEA4 usfaoVu34PPTI0tN4V2C6ilG9JUafb/lbjFFQhiN+MUNe1BbbM7YzAoKVpDdcMhxB/ 5/TTZqzxSDDc2cvVbGE6dEYrUnfUGGD/NbOpMvYU9VeC14R3wwiZ/1CBXMilL+HX93 q4buwJaXDRmiTCMGf7wEwqXD4zsrMh7hjpiIx4eHs+qPZJq5XHcTT9JQwe8soV1xrE d0DNgU11LZPEat17q+M2XZVh4QkQwfc1DBgp9qS1lUvoQ56rBwApmhpMdTYV5nrfHH m2nX5kOcBNNuQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 06 Sep 2024 20:46:11 +0200 Subject: [PATCH net-next v2 5/5] selftests: mptcp: connect: remove duplicated spaces in TAP output Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240906-net-next-mptcp-ksft-subtest-time-v2-5-31d5ee4f3bdf@kernel.org> References: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> In-Reply-To: <20240906-net-next-mptcp-ksft-subtest-time-v2-0-31d5ee4f3bdf@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2231; i=matttbe@kernel.org; h=from:subject:message-id; bh=JIwD47ohgeR39/mflNfwm5sG7pceaysqE8PN4r4u3Js=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBm2038rxbInPWV7BitNPE+7QuojyOTqgKUXrM5t /1lq8+RPtSJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZttN/AAKCRD2t4JPQmmg cwsPD/91Ag+CYOxlBLcBKddIiQSvdaY5x7Miwz+Excw/0+oMUgMvBjQ2+D0L7curjXeyoZPz6Xe MqxIOcMQZFdjVj1PQIfvcucuSkflBAI98Bjic96f5huKjuUCdXKvIVJttEM92Qhx46dMs3aUpS6 SLQdVBLorVedARees1Tp2zDIvODkXIpf1tfVbMMOPEM4UoLGWtqQBuOMvFSglDP10GFl/d5G2j4 HU3HoUqmewSJ4obKMXSKmWEsdSUBkSdwXIZeCkVBMZlw10qWY1hhcmqSelv7i621udX+EllwUH/ MXxlcVCNZrtkd38uvXzY51mTb1BlIfroQJp+BH5vsU8uxj76weiN2QINeGp2DnRpyucJQiqTnt9 5WoKQZUDZJ9SO8Kk1u03JPqncMWSuUWAoCLsKazaQejp9kKcjlPSkWNHJVUa/tlspY55WqUm7af JmpJyCthI68OBziS/GhEA+DbjeYyltzaLluusLJiVPGkFWNUHruTmk85/6a8c4Ljn8NavsF4g+Q KDT4eURqeRFlF/KYT0eF+15j3EZ2n53MFMMtCDcyR6MQ5C6P88h24t9sT5c0kDKdebBOkUkiQ1j 4S80L/17rAL3ixOdQkSvQq4VHmoLurI3JNsfSxODnlwAXJIOLPsi6M4wKLg21ByJwNGGZfn7ILq 7MVdeM0P3SPtKGQ== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 It is nice to have a visual alignment in the test output to present the different results, but it makes less sense in the TAP output that is there for computers. It sounds then better to remove the duplicated whitespaces in the TAP output, also because it can cause some issues with TAP parsers expecting only one space around the directive delimiter (#). While at it, change the variable name (result_msg) to something more explicit. Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 49d90c4dbc01..57325d57e4c6 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -345,9 +345,11 @@ do_transfer() local addr_port addr_port=$(printf "%s:%d" ${connect_addr} ${port}) - local result_msg - result_msg="$(printf "%.3s %-5s -> %.3s (%-20s) %-5s" ${connector_ns} ${cl_proto} ${listener_ns} ${addr_port} ${srv_proto})" - mptcp_lib_print_title "${result_msg}" + local pretty_title + pretty_title="$(printf "%.3s %-5s -> %.3s (%-20s) %-5s" ${connector_ns} ${cl_proto} ${listener_ns} ${addr_port} ${srv_proto})" + mptcp_lib_print_title "${pretty_title}" + + local tap_title="${connector_ns:0:3} ${cl_proto} -> ${listener_ns:0:3} (${addr_port}) ${srv_proto}" if $capture; then local capuser @@ -443,7 +445,7 @@ do_transfer() echo cat "$capout" - mptcp_lib_result_fail "${TEST_GROUP}: ${result_msg}" + mptcp_lib_result_fail "${TEST_GROUP}: ${tap_title}" return 1 fi @@ -543,12 +545,12 @@ do_transfer() if [ $retc -eq 0 ] && [ $rets -eq 0 ]; then mptcp_lib_pr_ok "${extra:1}" - mptcp_lib_result_pass "${TEST_GROUP}: ${result_msg}" + mptcp_lib_result_pass "${TEST_GROUP}: ${tap_title}" else if [ -n "${extra}" ]; then mptcp_lib_print_warn "${extra:1}" fi - mptcp_lib_result_fail "${TEST_GROUP}: ${result_msg}" + mptcp_lib_result_fail "${TEST_GROUP}: ${tap_title}" fi cat "$capout"