Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp610789lqp; Fri, 5 Apr 2024 03:52:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULQ6r9WCUvEl1IieSYAm3IO+edon6xn+fIgHisIc1kP4RGybDanCqcjtAXsukapIaONlk660Oup7oYpDh55wvcMDY+LPNC7i6dMI3gKw== X-Google-Smtp-Source: AGHT+IEtjTmzF5/U8nvzXaWCbnOEdAh/S+z7rqVaBTm4pmVzVeS5Xj7wtO3CQmEJdkaqTVd/A+cw X-Received: by 2002:a05:6214:dcc:b0:696:50bf:15d0 with SMTP id 12-20020a0562140dcc00b0069650bf15d0mr857685qvt.56.1712314372430; Fri, 05 Apr 2024 03:52:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712314372; cv=pass; d=google.com; s=arc-20160816; b=vWVfJrFm1XkGmbuBk6d4yPA4c0AWN70tIbw1LVbF2LGqOOQ2hzWb1zbpbM2RrS4UwC 47/kC0IVar/UKvVEapZN+ej8iXb4WiKSzmd9c/9jaSRL7GEdBvUh3Vxm4Fl9zw5KMOPU iM9HkeaBoo/ZjSfPR8kJ37yHQc6LuYbJ+T21eMQ1EKr+2QFFYNIfQdkaOqhRWQXy8N/A gsLmgyw3phhqtCrPYpu1WEwuRIJAwp3C4hT147cCEwKiwZWY9sJjrM8LIaUghG4Wu5Wg TSEOmpj0sxy0BONMxW7dE7YQgWDHSES2///xazg5WX/xtjRt53nhDPvM9yEsLpv9T0uY +xhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=P5dj9YPATD/aLJRN6xRqCQP6ilTBqRXEM2mYpiDcwwE=; fh=gM1fTaWoK9TL7webZ8yB3tcO8X47vwS7DNlJ3C0B/Lk=; b=GooKrISK8Ygn0+9APyus6QYnxQzr+vsx1N55qtZdB2/T0Lx48WtLMVRmjOiL4Bfxko 9gQE0Krj4SFNnLEWagadLNPSY3/cUZ4UdOGIculxhQQyxfcLhmKLvGs/CizFkypOmhk/ GJ3y4KJo88qnxOpW5SYY+YI0dr2tu07Bv1qHUTSahprL/qiFtbucO7VCCl4qa7saAqNa ZWPNlFqXSeeMzZRR0LQnIk9GlU4sWiASg6V1yHI/nR0nsAwFW/+wOi9sO3Gf2JFPrLxM JqGQFht7b9P0Sr4NiJZ6IkFs5vLDD77mB83RgpVrJ3mszS73DL2tx6hwzKLRmpzTD/Ck fpWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RxwrsM91; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-132855-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l10-20020a056214028a00b006968a5da44fsi1486235qvv.598.2024.04.05.03.52.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 03:52:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132855-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RxwrsM91; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-132855-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1D4401C204F8 for ; Fri, 5 Apr 2024 10:52:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD97016C423; Fri, 5 Apr 2024 10:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RxwrsM91" 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 B908516ABF3; Fri, 5 Apr 2024 10:52: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=1712314348; cv=none; b=TFVnCZBuFwi6Pu8Ah50N7W21Xo9/p8HvnFaA4V/k+UDYPmstdLLsfVTuOS6DphTFKDP/DTOQ8X11BA3rNErnAcBtYqJ6D7CwVNzCmiEPzLa1M+cF0/QeEuNkPSkhLIcSUtS3olX1iydByrq8D22YmlKsXpRvejU7q/5OFWPbx6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712314348; c=relaxed/simple; bh=UXfjZkvZut68urB9bj4+Y2yUcm70M+M+IzmNYeZgUlA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s3M0SV4TgtuiveBNKQ5MEUPV7S9X/cl2/a6QzRBLsPSmfJLwDrhoavNh0SmUN6Z9xlVP4KOkyyuNxkENaIVKXKcKHYwG92OSJl+MGMApL7oyZrLXgbl/m8cGt0oH42JXMZ3xGRTIGAmDUlWxAKso/5fMkzYPwV9+qthnk/mbFbg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RxwrsM91; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABA16C43330; Fri, 5 Apr 2024 10:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712314348; bh=UXfjZkvZut68urB9bj4+Y2yUcm70M+M+IzmNYeZgUlA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RxwrsM9120vrjE918Km9VXpKmSl8jkBBhoKRn21+mXfMYDD1pzPwccokyz4V8okqO ERWUq5F5BtbzTutoiIkfDUFcEVHK9ZKDEuOc8zCERlcmQcfMpQ/eZfkGads7ZvoWWp 871Fc1Y2/eoE/PeFcIJnfm4C94ov93r9UbZhipUrlZsSH1+F0sumE948lOP6ikFAtd HZ30vgoPXR5csc3oMjLjKrHMUyFSL5fXj5dSHqJOFCMQJDjLVZU+NCLxWYAWeG3ZEW YLUJ3U3z1wGFBUDjaGGSIhXjpHPKS+sMaGGhzCG0ecX8Svf68n1gF2Z7KH7Etfw77n JAbfG0EbldE9A== From: "Matthieu Baerts (NGI0)" Date: Fri, 05 Apr 2024 12:52:05 +0200 Subject: [PATCH net-next 01/11] selftests: mptcp: add tc check for check_tools Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240405-upstream-net-next-20240405-mptcp-selftests-refactoring-v1-1-eabc9b960966@kernel.org> References: <20240405-upstream-net-next-20240405-mptcp-selftests-refactoring-v1-0-eabc9b960966@kernel.org> In-Reply-To: <20240405-upstream-net-next-20240405-mptcp-selftests-refactoring-v1-0-eabc9b960966@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)" , Geliang Tang X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2829; i=matttbe@kernel.org; h=from:subject:message-id; bh=7cBbg2dhMoVMioQPZfDCl3TcQx85MupKC/OecHlLWlE=; b=kA0DAAgB9reCT0JpoHMByyZiAGYP1+WgO31O9a9x7v2LkGvt71BJBrLh7KVvkEe1ERsorPnTY YkCMgQAAQgAHRYhBOjLhfdodwV6bif3eva3gk9CaaBzBQJmD9flAAoJEPa3gk9CaaBzuEwP+Mtf m967ZBa/aPH3BzcIxGAh0rzXedUXTbUctd3QKYhQ/SlgUDFHhlHObU8nkyODLnZpO3OU2eZl6lb Q7xZqc6A7eMAsNiBDl/Dam/O4nHwDRrjv2eEbrHLK2t5Ei+06+58BK7MZuGBDQcVW2rh0LXYDOS BEK7G70NAgWVW/zChjDBXMqP7xW7KdqxUPC2TYl9ABiXrLt2BzTs3zCNZDn4VPx557r9Oas4IJj O5Wm+zSD8oPW7yv7WxRIJ/jB07LthGXusT0bNU8Eur4HfrlhHnXIOOxNWaMFvVZ+QklfUta8oJ9 Ksdo6WZV6cWq8k7bPb+Onyql9dcPdjqXB0jRSzHlkeoI5RNC5Bv1D2ShDBoU0Afud1CCM5H2RnP eM+3g4YElySNJS0E1uVUFXKppSvs1dbKRYPbejUKlOC9ITBGh3TCMbX1+v/nYGqnByITlLohKU+ rZ+QrSgHCm5MCHpw+nxYY27i+r9de6DyJ7zKkbK7BzVViQLcMsNR3B2ChpJLA/slaqXhEcp7Ai7 ND6v4bFFDbWOsDExLLWIYTTpxEzXc1njpVr1kUqNbkb0J9WruNzouaTgTMOyLZA1R+l1TBZpb5S 00fYho84mrv9OhvMvV365eQyNH1tPGA+1l1ZQTAs1JX78GGAGYlGYc4YxhZbfo8kDrB5pfhDPQx +jhI= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Geliang Tang tc are used in some test scripts: mptcp_connect.sh, mptcp_join.sh and simult_flows.sh. It makes sense to check if tc is installed before running these scripts, just like other tools. So this patch add 'tc' check for mptcp_lib_check_tools(), and check it in these test scripts. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +- tools/testing/selftests/net/mptcp/mptcp_join.sh | 2 +- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 6 ++++++ tools/testing/selftests/net/mptcp/simult_flows.sh | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 4131f3263a48..b77fb7065bfb 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -147,7 +147,7 @@ cleanup() mptcp_lib_check_mptcp mptcp_lib_check_kallsyms -mptcp_lib_check_tools ip +mptcp_lib_check_tools ip tc sin=$(mktemp) sout=$(mktemp) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index e4403236f655..5a95798eb40a 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -142,7 +142,7 @@ init() { mptcp_lib_check_mptcp mptcp_lib_check_kallsyms - mptcp_lib_check_tools ip ss "${iptables}" "${ip6tables}" + mptcp_lib_check_tools ip tc ss "${iptables}" "${ip6tables}" sin=$(mktemp) sout=$(mktemp) diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh index d529b4b37af8..1fa05405f65e 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -384,6 +384,12 @@ mptcp_lib_check_tools() { exit ${KSFT_SKIP} fi ;; + "tc") + if ! tc -help &> /dev/null; then + mptcp_lib_pr_skip "Could not run test without tc tool" + exit ${KSFT_SKIP} + fi + ;; "ss") if ! ss -h | grep -q MPTCP; then mptcp_lib_pr_skip "ss tool does not support MPTCP" diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index 1b2366220388..497141c49ccd 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -45,7 +45,7 @@ cleanup() } mptcp_lib_check_mptcp -mptcp_lib_check_tools ip +mptcp_lib_check_tools ip tc # "$ns1" ns2 ns3 # ns1eth1 ns2eth1 ns2eth3 ns3eth1 -- 2.43.0