Skip to content

Commit

Permalink
selftests: mptcp: set ip_mptcp in command line
Browse files Browse the repository at this point in the history
This patch added a command line option '-i' for mptcp_join.sh to use
'ip mptcp' commands instead of using 'pm_nl_ctl' commands to deal with
PM netlink.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Geliang Tang authored and Jakub Kicinski committed Feb 5, 2022
1 parent 6da1dfd commit 621bd39
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2117,6 +2117,7 @@ usage()
echo " -m fullmesh_tests"
echo " -c capture pcap files"
echo " -C enable data checksum"
echo " -i use ip mptcp"
echo " -h help"
}

Expand All @@ -2138,9 +2139,12 @@ for arg in "$@"; do
if [[ "${arg}" =~ ^"-"[0-9a-zA-Z]*"C"[0-9a-zA-Z]*$ ]]; then
checksum=1
fi
if [[ "${arg}" =~ ^"-"[0-9a-zA-Z]*"i"[0-9a-zA-Z]*$ ]]; then
ip_mptcp=1
fi

# exception for the capture/checksum options, the rest means: a part of the tests
if [ "${arg}" != "-c" ] && [ "${arg}" != "-C" ]; then
# exception for the capture/checksum/ip_mptcp options, the rest means: a part of the tests
if [ "${arg}" != "-c" ] && [ "${arg}" != "-C" ] && [ "${arg}" != "-i" ]; then
do_all_tests=0
fi
done
Expand All @@ -2150,7 +2154,7 @@ if [ $do_all_tests -eq 1 ]; then
exit $ret
fi

while getopts 'fesltra64bpkdmchCS' opt; do
while getopts 'fesltra64bpkdmchCSi' opt; do
case $opt in
f)
subflows_tests
Expand Down Expand Up @@ -2201,6 +2205,8 @@ while getopts 'fesltra64bpkdmchCS' opt; do
;;
C)
;;
i)
;;
h | *)
usage
;;
Expand Down

0 comments on commit 621bd39

Please sign in to comment.