From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: mptcp@lists.linux.dev, Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>
Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
Geliang Tang <tanggeliang@kylinos.cn>
Subject: [PATCH net-next 01/11] selftests: mptcp: add tc check for check_tools
Date: Fri, 05 Apr 2024 12:52:05 +0200 [thread overview]
Message-ID: <20240405-upstream-net-next-20240405-mptcp-selftests-refactoring-v1-1-eabc9b960966@kernel.org> (raw)
In-Reply-To: <20240405-upstream-net-next-20240405-mptcp-selftests-refactoring-v1-0-eabc9b960966@kernel.org>
From: Geliang Tang <tanggeliang@kylinos.cn>
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 <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
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
next prev parent reply other threads:[~2024-04-05 10:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 10:52 [PATCH net-next 00/11] selftests: mptcp: cleanups and 'ip mptcp' support Matthieu Baerts (NGI0)
2024-04-05 10:52 ` Matthieu Baerts (NGI0) [this message]
2024-04-05 10:52 ` [PATCH net-next 02/11] selftests: mptcp: add ms units for tc-netem delay Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 03/11] selftests: mptcp: export ip_mptcp to mptcp_lib Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 04/11] selftests: mptcp: netlink: add 'limits' helpers Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 05/11] selftests: mptcp: add {get,format}_endpoint(s) helpers Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 06/11] selftests: mptcp: netlink: add change_address helper Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 07/11] selftests: mptcp: join: update endpoint ops Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 08/11] selftests: mptcp: export pm_nl " Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 09/11] selftests: mptcp: use " Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 10/11] selftests: mptcp: ip_mptcp option for more scripts Matthieu Baerts (NGI0)
2024-04-05 10:52 ` [PATCH net-next 11/11] selftests: mptcp: netlink: drop disable=SC2086 Matthieu Baerts (NGI0)
2024-04-08 11:00 ` [PATCH net-next 00/11] selftests: mptcp: cleanups and 'ip mptcp' support patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240405-upstream-net-next-20240405-mptcp-selftests-refactoring-v1-1-eabc9b960966@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geliang@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=tanggeliang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.