mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
selftests: mptcp: add tc check for check_tools
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d2c3a7eb1a
commit
f30b04cacd
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user