From nobody Thu Sep 18 08:18:37 2025 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a05:6a06:869:b0:4b8:7781:bd2f with SMTP id d41csp696971pis; Tue, 26 Apr 2022 14:57:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVBCouMqAYvNnXJ4x7B8lMRrYXnsjs0DvIWQlPqMUZxlv2k9807WZbOYvDeTd+6pCgE3+o X-Received: by 2002:a05:6512:3d14:b0:46b:81d9:b9ee with SMTP id d20-20020a0565123d1400b0046b81d9b9eemr18100814lfv.109.1651010255434; Tue, 26 Apr 2022 14:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651010255; cv=none; d=google.com; s=arc-20160816; b=aUO6+h2wNqbZau0+I87Xe5b4yxJ5b/PyUZnSbjv4stjvIpsAvfCj0IAdsOOhdTJQqN WcTPKWPC+vi6W5/ejPSuLSOK1FFyqCFdepYM5ldP4hrMSbebM9XFWXVEgi32bCUyMaGW lhC8t9dPWmnCwe0rjpqUQuNmYE41umCmVmwKwvMBYYxmIxV3QzYkfR/VnxTXSV0AKged 3xEDYGPN3zW4d6WeOEZQo2ncSRJ7aiHAUuJb/S25JsaoljOdFu7snUV+7LfryvDE1op1 Fd2tdFmWKDBf+gnmE+W4uDQtRgLGQ/iY5QtJ/6xkTWVsi9cdCW8DCCE6bgBvMBoPvB8A Gl4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VLvH5Rpay8LI65F4gVU6dfNwaS+V/W6nmCqLJ1jvljI=; b=ZcNas49yOtmZ7BfBSD8nu/XNopyGaBpPphGH6GVVNZaaCaDyjcHqserFxxWnOUX62F THkjYLpbqX11EXBB4YeAfeORkGVDDK3nd7YjSex/uv2Hj2FdFynAvCfFj1PJMA+JbowX J7NaXLE2Yu4m0AfCZb9otaeSVeg2RUahOGPqBxJOnwx8+TmyFkd49eoGT98QFpEQqLR9 gsaL2WbeWeu86b51HNGFDFOFjtxk9QB3MSI/wWtugCXWFzleVxg+21ekBN3CuWvI6MzB 3lOeRwWUQmxqi4RXdAdCx1a5GX97ibFyPGew2u5jyYgOLDrhMLZHwP6AW4160QBJGfHe 0eag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GXHBB2Bh; spf=pass (google.com: domain of mptcp+bounces-4905-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) smtp.mailfrom="mptcp+bounces-4905-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from da.mirrors.kernel.org (da.mirrors.kernel.org. [139.178.84.19]) by mx.google.com with ESMTPS id c9-20020ac25f69000000b004721a3e27c5si2609054lfc.504.2022.04.26.14.57.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Apr 2022 14:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-4905-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) client-ip=139.178.84.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GXHBB2Bh; spf=pass (google.com: domain of mptcp+bounces-4905-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) smtp.mailfrom="mptcp+bounces-4905-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by da.mirrors.kernel.org (Postfix) with ESMTPS id 6CC622E09BF for ; Tue, 26 Apr 2022 21:57:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 153DB33E5; Tue, 26 Apr 2022 21:57:29 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (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 F36E633DC for ; Tue, 26 Apr 2022 21:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651010248; x=1682546248; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h1mVzQU2WcuajxA3wv/PeAoW8RekmBvFh10Ws+eVVTo=; b=GXHBB2BhW6IPSV2AUuhPMjhV4XWnE9yOXDcCqJT/SxIK4Nx1vGwgkoBL M4aQeb1qrGKd6iNKGCQWOpqMgfN5Ddu02J3wKUqVgMoTI6pve7hTNWtfz xUaV5DkL3J3YJu60znX9SVFKFOGcw02PFkA+mmoU5sRxK+XU9kBAEiAjj 7wK29BH0E3ARMsbHvH33BsYKbc+vP8zyyWm4odmew/zBRjUISDifJ+CXW lQdOpM8wJbNVaDQ0xUhrdggk6n+3/Fc9CpXL6rBmXppvOD4Pu4BoiFVrH ACrFK8jwe6FapJQBxns0597UxU0CCzhLoAzIyKPHyOiP3Juw2kGAOPu2g w==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="326222721" X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="326222721" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2022 14:57:23 -0700 X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="532878100" Received: from mjmartin-desk2.amr.corp.intel.com (HELO mjmartin-desk2.intel.com) ([10.209.10.176]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2022 14:57:23 -0700 From: Mat Martineau To: netdev@vger.kernel.org Cc: Geliang Tang , davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, matthieu.baerts@tessares.net, mptcp@lists.linux.dev, Mat Martineau Subject: [PATCH net-next 6/7] selftests: mptcp: check MP_FAIL response mibs Date: Tue, 26 Apr 2022 14:57:16 -0700 Message-Id: <20220426215717.129506-7-mathew.j.martineau@linux.intel.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426215717.129506-1-mathew.j.martineau@linux.intel.com> References: <20220426215717.129506-1-mathew.j.martineau@linux.intel.com> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Geliang Tang This patch extends chk_fail_nr to check the MP_FAIL response mibs. Add a new argument invert for chk_fail_nr to allow it can check the MP_FAIL TX and RX mibs from the opposite direction. When the infinite map is received before the MP_FAIL response, the response will be lost. A '-' can be added into fail_tx or fail_rx to represent that MP_FAIL response TX or RX can be lost when doing the checks. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- .../testing/selftests/net/mptcp/mptcp_join.sh | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 34152a50a3e2..8023c0773d95 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -1054,13 +1054,38 @@ chk_fail_nr() { local fail_tx=3D$1 local fail_rx=3D$2 + local ns_invert=3D${3:-""} local count local dump_stats + local ns_tx=3D$ns1 + local ns_rx=3D$ns2 + local extra_msg=3D"" + local allow_tx_lost=3D0 + local allow_rx_lost=3D0 + + if [[ $ns_invert =3D "invert" ]]; then + ns_tx=3D$ns2 + ns_rx=3D$ns1 + extra_msg=3D" invert" + fi + + if [[ "${fail_tx}" =3D "-"* ]]; then + allow_tx_lost=3D1 + fail_tx=3D${fail_tx:1} + fi + if [[ "${fail_rx}" =3D "-"* ]]; then + allow_rx_lost=3D1 + fail_rx=3D${fail_rx:1} + fi =20 printf "%-${nr_blank}s %s" " " "ftx" - count=3D$(ip netns exec $ns1 nstat -as | grep MPTcpExtMPFailTx | awk '{pr= int $2}') + count=3D$(ip netns exec $ns_tx nstat -as | grep MPTcpExtMPFailTx | awk '{= print $2}') [ -z "$count" ] && count=3D0 if [ "$count" !=3D "$fail_tx" ]; then + extra_msg=3D"$extra_msg,tx=3D$count" + fi + if { [ "$count" !=3D "$fail_tx" ] && [ $allow_tx_lost -eq 0 ]; } || + { [ "$count" -gt "$fail_tx" ] && [ $allow_tx_lost -eq 1 ]; }; then echo "[fail] got $count MP_FAIL[s] TX expected $fail_tx" fail_test dump_stats=3D1 @@ -1069,17 +1094,23 @@ chk_fail_nr() fi =20 echo -n " - failrx" - count=3D$(ip netns exec $ns2 nstat -as | grep MPTcpExtMPFailRx | awk '{pr= int $2}') + count=3D$(ip netns exec $ns_rx nstat -as | grep MPTcpExtMPFailRx | awk '{= print $2}') [ -z "$count" ] && count=3D0 if [ "$count" !=3D "$fail_rx" ]; then + extra_msg=3D"$extra_msg,rx=3D$count" + fi + if { [ "$count" !=3D "$fail_rx" ] && [ $allow_rx_lost -eq 0 ]; } || + { [ "$count" -gt "$fail_rx" ] && [ $allow_rx_lost -eq 1 ]; }; then echo "[fail] got $count MP_FAIL[s] RX expected $fail_rx" fail_test dump_stats=3D1 else - echo "[ ok ]" + echo -n "[ ok ]" fi =20 [ "${dump_stats}" =3D 1 ] && dump_stats + + echo "$extra_msg" } =20 chk_fclose_nr() @@ -2654,6 +2685,7 @@ fail_tests() if reset_with_fail "Infinite map" 1; then run_tests $ns1 $ns2 10.0.1.1 128 chk_join_nr 0 0 0 +1 +0 1 0 1 "$(pedit_action_pkts)" + chk_fail_nr 1 -1 invert fi } =20 --=20 2.36.0