+++ /dev/null
-From 054a558df0fa9869b37cc4f5b05dafa5d5d6dd0e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 19 Nov 2020 11:46:01 -0800
-Subject: selftests: mptcp: add ADD_ADDR IPv6 test cases
-
-From: Geliang Tang <geliangtang@gmail.com>
-
-[ Upstream commit 523514ed0a998fda389b9b6f00d0f2054ba30d25 ]
-
-This patch added IPv6 support for do_transfer, and the test cases for
-ADD_ADDR IPv6.
-
-Acked-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Geliang Tang <geliangtang@gmail.com>
-Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- .../testing/selftests/net/mptcp/mptcp_join.sh | 70 ++++++++++++++++++-
- 1 file changed, 69 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-index f841ed8186c1..0eae628d1ffd 100755
---- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
-+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -195,6 +195,12 @@ link_failure()
- ip -net "$ns" link set "$veth" down
- }
-
-+# $1: IP address
-+is_v6()
-+{
-+ [ -z "${1##*:*}" ]
-+}
-+
- do_transfer()
- {
- listener_ns="$1"
-@@ -236,7 +242,15 @@ do_transfer()
- mptcp_connect="./mptcp_connect -r"
- fi
-
-- ip netns exec ${listener_ns} $mptcp_connect -t $timeout -l -p $port -s ${srv_proto} 0.0.0.0 < "$sin" > "$sout" &
-+ local local_addr
-+ if is_v6 "${connect_addr}"; then
-+ local_addr="::"
-+ else
-+ local_addr="0.0.0.0"
-+ fi
-+
-+ ip netns exec ${listener_ns} $mptcp_connect -t $timeout -l -p $port \
-+ -s ${srv_proto} ${local_addr} < "$sin" > "$sout" &
- spid=$!
-
- sleep 1
-@@ -649,6 +663,60 @@ chk_join_nr "remove subflows and signal" 3 3 3
- chk_add_nr 1 1
- chk_rm_nr 2 2
-
-+# subflow IPv6
-+reset
-+ip netns exec $ns1 ./pm_nl_ctl limits 0 1
-+ip netns exec $ns2 ./pm_nl_ctl limits 0 1
-+ip netns exec $ns2 ./pm_nl_ctl add dead:beef:3::2 flags subflow
-+run_tests $ns1 $ns2 dead:beef:1::1 0 0 0 slow
-+chk_join_nr "single subflow IPv6" 1 1 1
-+
-+# add_address, unused IPv6
-+reset
-+ip netns exec $ns1 ./pm_nl_ctl add dead:beef:2::1 flags signal
-+run_tests $ns1 $ns2 dead:beef:1::1 0 0 0 slow
-+chk_join_nr "unused signal address IPv6" 0 0 0
-+chk_add_nr 1 1
-+
-+# signal address IPv6
-+reset
-+ip netns exec $ns1 ./pm_nl_ctl limits 0 1
-+ip netns exec $ns1 ./pm_nl_ctl add dead:beef:2::1 flags signal
-+ip netns exec $ns2 ./pm_nl_ctl limits 1 1
-+run_tests $ns1 $ns2 dead:beef:1::1 0 0 0 slow
-+chk_join_nr "single address IPv6" 1 1 1
-+chk_add_nr 1 1
-+
-+# add_addr timeout IPv6
-+reset_with_add_addr_timeout 6
-+ip netns exec $ns1 ./pm_nl_ctl limits 0 1
-+ip netns exec $ns2 ./pm_nl_ctl limits 1 1
-+ip netns exec $ns1 ./pm_nl_ctl add dead:beef:2::1 flags signal
-+run_tests $ns1 $ns2 dead:beef:1::1 0 0 0 slow
-+chk_join_nr "signal address, ADD_ADDR6 timeout" 1 1 1
-+chk_add_nr 4 0
-+
-+# single address IPv6, remove
-+reset
-+ip netns exec $ns1 ./pm_nl_ctl limits 0 1
-+ip netns exec $ns1 ./pm_nl_ctl add dead:beef:2::1 flags signal
-+ip netns exec $ns2 ./pm_nl_ctl limits 1 1
-+run_tests $ns1 $ns2 dead:beef:1::1 0 1 0 slow
-+chk_join_nr "remove single address IPv6" 1 1 1
-+chk_add_nr 1 1
-+chk_rm_nr 0 0
-+
-+# subflow and signal IPv6, remove
-+reset
-+ip netns exec $ns1 ./pm_nl_ctl limits 0 2
-+ip netns exec $ns1 ./pm_nl_ctl add dead:beef:2::1 flags signal
-+ip netns exec $ns2 ./pm_nl_ctl limits 1 2
-+ip netns exec $ns2 ./pm_nl_ctl add dead:beef:3::2 flags subflow
-+run_tests $ns1 $ns2 dead:beef:1::1 0 1 1 slow
-+chk_join_nr "remove subflow and signal IPv6" 2 2 2
-+chk_add_nr 1 1
-+chk_rm_nr 1 1
-+
- # single subflow, syncookies
- reset_with_cookies
- ip netns exec $ns1 ./pm_nl_ctl limits 0 1
---
-2.35.1
-
+++ /dev/null
-From 825473bcfd4099d00437859475e8141a835f1bc8 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 3 Nov 2020 11:05:09 -0800
-Subject: selftests: mptcp: add ADD_ADDR timeout test case
-
-From: Geliang Tang <geliangtang@gmail.com>
-
-[ Upstream commit 8d014eaa9254a9b8e0841df40dd36782b451579a ]
-
-This patch added the test case for retransmitting ADD_ADDR when timeout
-occurs. It set NS1's add_addr_timeout to 1 second, and drop NS2's ADD_ADDR
-echo packets.
-
-Here we need to slow down the transfer process of all data to let the
-ADD_ADDR suboptions can be retransmitted three times. So we added a new
-parameter "speed" for do_transfer, it can be set with fast or slow.
-
-We also added three new optional parameters for run_tests, and dropped
-run_remove_tests function.
-
-Since we added the netfilter rules in this test case, we need to update
-the "config" file.
-
-Suggested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
-Suggested-by: Paolo Abeni <pabeni@redhat.com>
-Acked-by: Paolo Abeni <pabeni@redhat.com>
-Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
-Signed-off-by: Geliang Tang <geliangtang@gmail.com>
-Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/net/mptcp/config | 10 ++
- .../testing/selftests/net/mptcp/mptcp_join.sh | 94 ++++++++++++++-----
- 2 files changed, 80 insertions(+), 24 deletions(-)
-
-diff --git a/tools/testing/selftests/net/mptcp/config b/tools/testing/selftests/net/mptcp/config
-index 741a1c4f4ae8..0faaccd21447 100644
---- a/tools/testing/selftests/net/mptcp/config
-+++ b/tools/testing/selftests/net/mptcp/config
-@@ -5,3 +5,13 @@ CONFIG_INET_DIAG=m
- CONFIG_INET_MPTCP_DIAG=m
- CONFIG_VETH=y
- CONFIG_NET_SCH_NETEM=m
-+CONFIG_NETFILTER=y
-+CONFIG_NETFILTER_ADVANCED=y
-+CONFIG_NETFILTER_NETLINK=m
-+CONFIG_NF_TABLES=m
-+CONFIG_NFT_COUNTER=m
-+CONFIG_NFT_COMPAT=m
-+CONFIG_NETFILTER_XTABLES=m
-+CONFIG_NETFILTER_XT_MATCH_BPF=m
-+CONFIG_NF_TABLES_IPV4=y
-+CONFIG_NF_TABLES_IPV6=y
-diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-index 08f53d86dedc..0d93b243695f 100755
---- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
-+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -13,6 +13,24 @@ capture=0
-
- TEST_COUNT=0
-
-+# generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) ||
-+# (ip6 && (ip6[74] & 0xf0) == 0x30)'"
-+CBPF_MPTCP_SUBOPTION_ADD_ADDR="14,
-+ 48 0 0 0,
-+ 84 0 0 240,
-+ 21 0 3 64,
-+ 48 0 0 54,
-+ 84 0 0 240,
-+ 21 6 7 48,
-+ 48 0 0 0,
-+ 84 0 0 240,
-+ 21 0 4 96,
-+ 48 0 0 74,
-+ 84 0 0 240,
-+ 21 0 1 48,
-+ 6 0 0 65535,
-+ 6 0 0 0"
-+
- init()
- {
- capout=$(mktemp)
-@@ -82,6 +100,26 @@ reset_with_cookies()
- done
- }
-
-+reset_with_add_addr_timeout()
-+{
-+ local ip="${1:-4}"
-+ local tables
-+
-+ tables="iptables"
-+ if [ $ip -eq 6 ]; then
-+ tables="ip6tables"
-+ fi
-+
-+ reset
-+
-+ ip netns exec $ns1 sysctl -q net.mptcp.add_addr_timeout=1
-+ ip netns exec $ns2 $tables -A OUTPUT -p tcp \
-+ -m tcp --tcp-option 30 \
-+ -m bpf --bytecode \
-+ "$CBPF_MPTCP_SUBOPTION_ADD_ADDR" \
-+ -j DROP
-+}
-+
- for arg in "$@"; do
- if [ "$arg" = "-c" ]; then
- capture=1
-@@ -94,6 +132,17 @@ if [ $? -ne 0 ];then
- exit $ksft_skip
- fi
-
-+iptables -V > /dev/null 2>&1
-+if [ $? -ne 0 ];then
-+ echo "SKIP: Could not run all tests without iptables tool"
-+ exit $ksft_skip
-+fi
-+
-+ip6tables -V > /dev/null 2>&1
-+if [ $? -ne 0 ];then
-+ echo "SKIP: Could not run all tests without ip6tables tool"
-+ exit $ksft_skip
-+fi
-
- check_transfer()
- {
-@@ -135,6 +184,7 @@ do_transfer()
- connect_addr="$5"
- rm_nr_ns1="$6"
- rm_nr_ns2="$7"
-+ speed="$8"
-
- port=$((10000+$TEST_COUNT))
- TEST_COUNT=$((TEST_COUNT+1))
-@@ -159,7 +209,7 @@ do_transfer()
- sleep 1
- fi
-
-- if [[ $rm_nr_ns1 -eq 0 && $rm_nr_ns2 -eq 0 ]]; then
-+ if [ $speed = "fast" ]; then
- mptcp_connect="./mptcp_connect -j"
- else
- mptcp_connect="./mptcp_connect -r"
-@@ -250,26 +300,13 @@ run_tests()
- listener_ns="$1"
- connector_ns="$2"
- connect_addr="$3"
-+ rm_nr_ns1="${4:-0}"
-+ rm_nr_ns2="${5:-0}"
-+ speed="${6:-fast}"
- lret=0
-
-- do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} 0 0
-- lret=$?
-- if [ $lret -ne 0 ]; then
-- ret=$lret
-- return
-- fi
--}
--
--run_remove_tests()
--{
-- listener_ns="$1"
-- connector_ns="$2"
-- connect_addr="$3"
-- rm_nr_ns1="$4"
-- rm_nr_ns2="$5"
-- lret=0
--
-- do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} ${rm_nr_ns1} ${rm_nr_ns2}
-+ do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} \
-+ ${rm_nr_ns1} ${rm_nr_ns2} ${speed}
- lret=$?
- if [ $lret -ne 0 ]; then
- ret=$lret
-@@ -491,12 +528,21 @@ run_tests $ns1 $ns2 10.0.1.1
- chk_join_nr "multiple subflows and signal" 3 3 3
- chk_add_nr 1 1
-
-+# add_addr timeout
-+reset_with_add_addr_timeout
-+ip netns exec $ns1 ./pm_nl_ctl limits 0 1
-+ip netns exec $ns2 ./pm_nl_ctl limits 1 1
-+ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
-+run_tests $ns1 $ns2 10.0.1.1 0 0 slow
-+chk_join_nr "signal address, ADD_ADDR timeout" 1 1 1
-+chk_add_nr 4 0
-+
- # single subflow, remove
- reset
- ip netns exec $ns1 ./pm_nl_ctl limits 0 1
- ip netns exec $ns2 ./pm_nl_ctl limits 0 1
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
--run_remove_tests $ns1 $ns2 10.0.1.1 0 1
-+run_tests $ns1 $ns2 10.0.1.1 0 1 slow
- chk_join_nr "remove single subflow" 1 1 1
- chk_rm_nr 1 1
-
-@@ -506,7 +552,7 @@ ip netns exec $ns1 ./pm_nl_ctl limits 0 2
- ip netns exec $ns2 ./pm_nl_ctl limits 0 2
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.2.2 flags subflow
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
--run_remove_tests $ns1 $ns2 10.0.1.1 0 2
-+run_tests $ns1 $ns2 10.0.1.1 0 2 slow
- chk_join_nr "remove multiple subflows" 2 2 2
- chk_rm_nr 2 2
-
-@@ -515,7 +561,7 @@ reset
- ip netns exec $ns1 ./pm_nl_ctl limits 0 1
- ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
- ip netns exec $ns2 ./pm_nl_ctl limits 1 1
--run_remove_tests $ns1 $ns2 10.0.1.1 1 0
-+run_tests $ns1 $ns2 10.0.1.1 1 0 slow
- chk_join_nr "remove single address" 1 1 1
- chk_add_nr 1 1
- chk_rm_nr 0 0
-@@ -526,7 +572,7 @@ ip netns exec $ns1 ./pm_nl_ctl limits 0 2
- ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
- ip netns exec $ns2 ./pm_nl_ctl limits 1 2
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
--run_remove_tests $ns1 $ns2 10.0.1.1 1 1
-+run_tests $ns1 $ns2 10.0.1.1 1 1 slow
- chk_join_nr "remove subflow and signal" 2 2 2
- chk_add_nr 1 1
- chk_rm_nr 1 1
-@@ -538,7 +584,7 @@ ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
- ip netns exec $ns2 ./pm_nl_ctl limits 1 3
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.4.2 flags subflow
--run_remove_tests $ns1 $ns2 10.0.1.1 1 2
-+run_tests $ns1 $ns2 10.0.1.1 1 2 slow
- chk_join_nr "remove subflows and signal" 3 3 3
- chk_add_nr 1 1
- chk_rm_nr 2 2
---
-2.35.1
-
+++ /dev/null
-From b9318292fae9121f77c7cae66b174eec89273b9a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 19 Nov 2020 11:45:57 -0800
-Subject: selftests: mptcp: add link failure test case
-
-From: Florian Westphal <fw@strlen.de>
-
-[ Upstream commit 8b819a84d4b12c4a91cc9f91ad69ca09c3e0606d ]
-
-Add a test case where a link fails with multiple subflows.
-The expectation is that MPTCP will transmit any data that
-could not be delivered via the failed link on another subflow.
-
-Co-developed-by: Geliang Tang <geliangtang@gmail.com>
-Signed-off-by: Geliang Tang <geliangtang@gmail.com>
-Signed-off-by: Florian Westphal <fw@strlen.de>
-Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- .../testing/selftests/net/mptcp/mptcp_join.sh | 104 ++++++++++++++----
- 1 file changed, 82 insertions(+), 22 deletions(-)
-
-diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-index 0d93b243695f..f841ed8186c1 100755
---- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
-+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -5,6 +5,7 @@ ret=0
- sin=""
- sout=""
- cin=""
-+cinsent=""
- cout=""
- ksft_skip=4
- timeout=30
-@@ -81,7 +82,7 @@ cleanup_partial()
- cleanup()
- {
- rm -f "$cin" "$cout"
-- rm -f "$sin" "$sout"
-+ rm -f "$sin" "$sout" "$cinsent"
- cleanup_partial
- }
-
-@@ -144,6 +145,13 @@ if [ $? -ne 0 ];then
- exit $ksft_skip
- fi
-
-+print_file_err()
-+{
-+ ls -l "$1" 1>&2
-+ echo "Trailing bytes are: "
-+ tail -c 27 "$1"
-+}
-+
- check_transfer()
- {
- in=$1
-@@ -155,6 +163,7 @@ check_transfer()
- echo "[ FAIL ] $what does not match (in, out):"
- print_file_err "$in"
- print_file_err "$out"
-+ ret=1
-
- return 1
- fi
-@@ -175,6 +184,17 @@ do_ping()
- fi
- }
-
-+link_failure()
-+{
-+ ns="$1"
-+
-+ l=$((RANDOM%4))
-+ l=$((l+1))
-+
-+ veth="ns1eth$l"
-+ ip -net "$ns" link set "$veth" down
-+}
-+
- do_transfer()
- {
- listener_ns="$1"
-@@ -182,9 +202,10 @@ do_transfer()
- cl_proto="$3"
- srv_proto="$4"
- connect_addr="$5"
-- rm_nr_ns1="$6"
-- rm_nr_ns2="$7"
-- speed="$8"
-+ test_link_fail="$6"
-+ rm_nr_ns1="$7"
-+ rm_nr_ns2="$8"
-+ speed="$9"
-
- port=$((10000+$TEST_COUNT))
- TEST_COUNT=$((TEST_COUNT+1))
-@@ -220,7 +241,12 @@ do_transfer()
-
- sleep 1
-
-- ip netns exec ${connector_ns} $mptcp_connect -t $timeout -p $port -s ${cl_proto} $connect_addr < "$cin" > "$cout" &
-+ if [ "$test_link_fail" -eq 0 ];then
-+ ip netns exec ${connector_ns} $mptcp_connect -t $timeout -p $port -s ${cl_proto} $connect_addr < "$cin" > "$cout" &
-+ else
-+ ( cat "$cin" ; sleep 2; link_failure $listener_ns ; cat "$cin" ) | tee "$cinsent" | \
-+ ip netns exec ${connector_ns} $mptcp_connect -t $timeout -p $port -s ${cl_proto} $connect_addr > "$cout" &
-+ fi
- cpid=$!
-
- if [ $rm_nr_ns1 -gt 0 ]; then
-@@ -265,12 +291,17 @@ do_transfer()
- ip netns exec ${connector_ns} ss -nita 1>&2 -o "dport = :$port"
-
- cat "$capout"
-+ ret=1
- return 1
- fi
-
- check_transfer $sin $cout "file received by client"
- retc=$?
-- check_transfer $cin $sout "file received by server"
-+ if [ "$test_link_fail" -eq 0 ];then
-+ check_transfer $cin $sout "file received by server"
-+ else
-+ check_transfer $cinsent $sout "file received by server"
-+ fi
- rets=$?
-
- if [ $retc -eq 0 ] && [ $rets -eq 0 ];then
-@@ -286,13 +317,12 @@ make_file()
- {
- name=$1
- who=$2
-+ size=$3
-
-- SIZE=1
--
-- dd if=/dev/urandom of="$name" bs=1024 count=$SIZE 2> /dev/null
-+ dd if=/dev/urandom of="$name" bs=1024 count=$size 2> /dev/null
- echo -e "\nMPTCP_TEST_FILE_END_MARKER" >> "$name"
-
-- echo "Created $name (size $SIZE KB) containing data sent by $who"
-+ echo "Created $name (size $size KB) containing data sent by $who"
- }
-
- run_tests()
-@@ -300,14 +330,32 @@ run_tests()
- listener_ns="$1"
- connector_ns="$2"
- connect_addr="$3"
-- rm_nr_ns1="${4:-0}"
-- rm_nr_ns2="${5:-0}"
-- speed="${6:-fast}"
-+ test_linkfail="${4:-0}"
-+ rm_nr_ns1="${5:-0}"
-+ rm_nr_ns2="${6:-0}"
-+ speed="${7:-fast}"
- lret=0
-+ oldin=""
-+
-+ if [ "$test_linkfail" -eq 1 ];then
-+ size=$((RANDOM%1024))
-+ size=$((size+1))
-+ size=$((size*128))
-+
-+ oldin=$(mktemp)
-+ cp "$cin" "$oldin"
-+ make_file "$cin" "client" $size
-+ fi
-
- do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} \
-- ${rm_nr_ns1} ${rm_nr_ns2} ${speed}
-+ ${test_linkfail} ${rm_nr_ns1} ${rm_nr_ns2} ${speed}
- lret=$?
-+
-+ if [ "$test_linkfail" -eq 1 ];then
-+ cp "$oldin" "$cin"
-+ rm -f "$oldin"
-+ fi
-+
- if [ $lret -ne 0 ]; then
- ret=$lret
- return
-@@ -440,10 +488,11 @@ chk_rm_nr()
- sin=$(mktemp)
- sout=$(mktemp)
- cin=$(mktemp)
-+cinsent=$(mktemp)
- cout=$(mktemp)
- init
--make_file "$cin" "client"
--make_file "$sin" "server"
-+make_file "$cin" "client" 1
-+make_file "$sin" "server" 1
- trap cleanup EXIT
-
- run_tests $ns1 $ns2 10.0.1.1
-@@ -528,12 +577,23 @@ run_tests $ns1 $ns2 10.0.1.1
- chk_join_nr "multiple subflows and signal" 3 3 3
- chk_add_nr 1 1
-
-+# accept and use add_addr with additional subflows and link loss
-+reset
-+ip netns exec $ns1 ./pm_nl_ctl limits 0 3
-+ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
-+ip netns exec $ns2 ./pm_nl_ctl limits 1 3
-+ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
-+ip netns exec $ns2 ./pm_nl_ctl add 10.0.4.2 flags subflow
-+run_tests $ns1 $ns2 10.0.1.1 1
-+chk_join_nr "multiple flows, signal, link failure" 3 3 3
-+chk_add_nr 1 1
-+
- # add_addr timeout
- reset_with_add_addr_timeout
- ip netns exec $ns1 ./pm_nl_ctl limits 0 1
- ip netns exec $ns2 ./pm_nl_ctl limits 1 1
- ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
--run_tests $ns1 $ns2 10.0.1.1 0 0 slow
-+run_tests $ns1 $ns2 10.0.1.1 0 0 0 slow
- chk_join_nr "signal address, ADD_ADDR timeout" 1 1 1
- chk_add_nr 4 0
-
-@@ -542,7 +602,7 @@ reset
- ip netns exec $ns1 ./pm_nl_ctl limits 0 1
- ip netns exec $ns2 ./pm_nl_ctl limits 0 1
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
--run_tests $ns1 $ns2 10.0.1.1 0 1 slow
-+run_tests $ns1 $ns2 10.0.1.1 0 0 1 slow
- chk_join_nr "remove single subflow" 1 1 1
- chk_rm_nr 1 1
-
-@@ -552,7 +612,7 @@ ip netns exec $ns1 ./pm_nl_ctl limits 0 2
- ip netns exec $ns2 ./pm_nl_ctl limits 0 2
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.2.2 flags subflow
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
--run_tests $ns1 $ns2 10.0.1.1 0 2 slow
-+run_tests $ns1 $ns2 10.0.1.1 0 0 2 slow
- chk_join_nr "remove multiple subflows" 2 2 2
- chk_rm_nr 2 2
-
-@@ -561,7 +621,7 @@ reset
- ip netns exec $ns1 ./pm_nl_ctl limits 0 1
- ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
- ip netns exec $ns2 ./pm_nl_ctl limits 1 1
--run_tests $ns1 $ns2 10.0.1.1 1 0 slow
-+run_tests $ns1 $ns2 10.0.1.1 0 1 0 slow
- chk_join_nr "remove single address" 1 1 1
- chk_add_nr 1 1
- chk_rm_nr 0 0
-@@ -572,7 +632,7 @@ ip netns exec $ns1 ./pm_nl_ctl limits 0 2
- ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
- ip netns exec $ns2 ./pm_nl_ctl limits 1 2
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
--run_tests $ns1 $ns2 10.0.1.1 1 1 slow
-+run_tests $ns1 $ns2 10.0.1.1 0 1 1 slow
- chk_join_nr "remove subflow and signal" 2 2 2
- chk_add_nr 1 1
- chk_rm_nr 1 1
-@@ -584,7 +644,7 @@ ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
- ip netns exec $ns2 ./pm_nl_ctl limits 1 3
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
- ip netns exec $ns2 ./pm_nl_ctl add 10.0.4.2 flags subflow
--run_tests $ns1 $ns2 10.0.1.1 1 2 slow
-+run_tests $ns1 $ns2 10.0.1.1 0 1 2 slow
- chk_join_nr "remove subflows and signal" 3 3 3
- chk_add_nr 1 1
- chk_rm_nr 2 2
---
-2.35.1
-
+++ /dev/null
-From d181f6e27b7f5f0186de786a1876fdd8be35e0fb Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 18 Feb 2022 13:35:38 -0800
-Subject: selftests: mptcp: fix diag instability
-
-From: Paolo Abeni <pabeni@redhat.com>
-
-[ Upstream commit 0cd33c5ffec12bd77a1c02db2469fac08f840939 ]
-
-Instead of waiting for an arbitrary amount of time for the MPTCP
-MP_CAPABLE handshake to complete, explicitly wait for the relevant
-socket to enter into the established status.
-
-Additionally let the data transfer application use the slowest
-transfer mode available (-r), to cope with very slow host, or
-high jitter caused by hosting VMs.
-
-Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
-Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/258
-Reported-and-tested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/net/mptcp/diag.sh | 44 +++++++++++++++++++----
- 1 file changed, 37 insertions(+), 7 deletions(-)
-
-diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh
-index 2674ba20d524..ff821025d309 100755
---- a/tools/testing/selftests/net/mptcp/diag.sh
-+++ b/tools/testing/selftests/net/mptcp/diag.sh
-@@ -71,6 +71,36 @@ chk_msk_remote_key_nr()
- __chk_nr "grep -c remote_key" $*
- }
-
-+# $1: ns, $2: port
-+wait_local_port_listen()
-+{
-+ local listener_ns="${1}"
-+ local port="${2}"
-+
-+ local port_hex i
-+
-+ port_hex="$(printf "%04X" "${port}")"
-+ for i in $(seq 10); do
-+ ip netns exec "${listener_ns}" cat /proc/net/tcp | \
-+ awk "BEGIN {rc=1} {if (\$2 ~ /:${port_hex}\$/ && \$4 ~ /0A/) {rc=0; exit}} END {exit rc}" &&
-+ break
-+ sleep 0.1
-+ done
-+}
-+
-+wait_connected()
-+{
-+ local listener_ns="${1}"
-+ local port="${2}"
-+
-+ local port_hex i
-+
-+ port_hex="$(printf "%04X" "${port}")"
-+ for i in $(seq 10); do
-+ ip netns exec ${listener_ns} grep -q " 0100007F:${port_hex} " /proc/net/tcp && break
-+ sleep 0.1
-+ done
-+}
-
- trap cleanup EXIT
- ip netns add $ns
-@@ -81,15 +111,15 @@ echo "a" | \
- ip netns exec $ns \
- ./mptcp_connect -p 10000 -l -t ${timeout_poll} \
- 0.0.0.0 >/dev/null &
--sleep 0.1
-+wait_local_port_listen $ns 10000
- chk_msk_nr 0 "no msk on netns creation"
-
- echo "b" | \
- timeout ${timeout_test} \
- ip netns exec $ns \
-- ./mptcp_connect -p 10000 -j -t ${timeout_poll} \
-+ ./mptcp_connect -p 10000 -r 0 -t ${timeout_poll} \
- 127.0.0.1 >/dev/null &
--sleep 0.1
-+wait_connected $ns 10000
- chk_msk_nr 2 "after MPC handshake "
- chk_msk_remote_key_nr 2 "....chk remote_key"
- chk_msk_fallback_nr 0 "....chk no fallback"
-@@ -101,13 +131,13 @@ echo "a" | \
- ip netns exec $ns \
- ./mptcp_connect -p 10001 -l -s TCP -t ${timeout_poll} \
- 0.0.0.0 >/dev/null &
--sleep 0.1
-+wait_local_port_listen $ns 10001
- echo "b" | \
- timeout ${timeout_test} \
- ip netns exec $ns \
-- ./mptcp_connect -p 10001 -j -t ${timeout_poll} \
-+ ./mptcp_connect -p 10001 -r 0 -t ${timeout_poll} \
- 127.0.0.1 >/dev/null &
--sleep 0.1
-+wait_connected $ns 10001
- chk_msk_fallback_nr 1 "check fallback"
- flush_pids
-
-@@ -119,7 +149,7 @@ for I in `seq 1 $NR_CLIENTS`; do
- ./mptcp_connect -p $((I+10001)) -l -w 10 \
- -t ${timeout_poll} 0.0.0.0 >/dev/null &
- done
--sleep 0.1
-+wait_local_port_listen $ns $((NR_CLIENTS + 10001))
-
- for I in `seq 1 $NR_CLIENTS`; do
- echo "b" | \
---
-2.35.1
-
+++ /dev/null
-From b23c8fba255147839099d099df957bc42e984191 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 1 Apr 2021 16:19:45 -0700
-Subject: selftests: mptcp: launch mptcp_connect with timeout
-
-From: Matthieu Baerts <matthieu.baerts@tessares.net>
-
-[ Upstream commit 5888a61cb4e00695075bbacfd86f3fa73af00413 ]
-
-'mptcp_connect' already has a timeout for poll() but in some cases, it
-is not enough.
-
-With "timeout" tool, we will force the command to fail if it doesn't
-finish on time. Thanks to that, the script will continue and display
-details about the current state before marking the test as failed.
-Displaying this state is very important to be able to understand the
-issue. Best to have our CI reporting the issue than just "the test
-hanged".
-
-Note that in mptcp_connect.sh, we were using a long timeout to validate
-the fact we cannot create a socket if a sysctl is set. We don't need
-this timeout.
-
-In diag.sh, we want to send signals to mptcp_connect instances that have
-been started in the netns. But we cannot send this signal to 'timeout'
-otherwise that will stop the timeout and messages telling us SIGUSR1 has
-been received will be printed. Instead of trying to find the right PID
-and storing them in an array, we can simply use the output of
-'ip netns pids' which is all the PIDs we want to send signal to.
-
-Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/160
-Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
-Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/net/mptcp/diag.sh | 55 ++++++++++++-------
- .../selftests/net/mptcp/mptcp_connect.sh | 15 +++--
- .../testing/selftests/net/mptcp/mptcp_join.sh | 22 ++++++--
- .../selftests/net/mptcp/simult_flows.sh | 13 ++++-
- 4 files changed, 72 insertions(+), 33 deletions(-)
-
-diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh
-index 39edce4f541c..2674ba20d524 100755
---- a/tools/testing/selftests/net/mptcp/diag.sh
-+++ b/tools/testing/selftests/net/mptcp/diag.sh
-@@ -5,8 +5,9 @@ rndh=$(printf %x $sec)-$(mktemp -u XXXXXX)
- ns="ns1-$rndh"
- ksft_skip=4
- test_cnt=1
-+timeout_poll=100
-+timeout_test=$((timeout_poll * 2 + 1))
- ret=0
--pids=()
-
- flush_pids()
- {
-@@ -14,18 +15,14 @@ flush_pids()
- # give it some time
- sleep 1.1
-
-- for pid in ${pids[@]}; do
-- [ -d /proc/$pid ] && kill -SIGUSR1 $pid >/dev/null 2>&1
-- done
-- pids=()
-+ ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGUSR1 &>/dev/null
- }
-
- cleanup()
- {
-+ ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGKILL &>/dev/null
-+
- ip netns del $ns
-- for pid in ${pids[@]}; do
-- [ -d /proc/$pid ] && kill -9 $pid >/dev/null 2>&1
-- done
- }
-
- ip -Version > /dev/null 2>&1
-@@ -79,39 +76,57 @@ trap cleanup EXIT
- ip netns add $ns
- ip -n $ns link set dev lo up
-
--echo "a" | ip netns exec $ns ./mptcp_connect -p 10000 -l 0.0.0.0 -t 100 >/dev/null &
-+echo "a" | \
-+ timeout ${timeout_test} \
-+ ip netns exec $ns \
-+ ./mptcp_connect -p 10000 -l -t ${timeout_poll} \
-+ 0.0.0.0 >/dev/null &
- sleep 0.1
--pids[0]=$!
- chk_msk_nr 0 "no msk on netns creation"
-
--echo "b" | ip netns exec $ns ./mptcp_connect -p 10000 127.0.0.1 -j -t 100 >/dev/null &
-+echo "b" | \
-+ timeout ${timeout_test} \
-+ ip netns exec $ns \
-+ ./mptcp_connect -p 10000 -j -t ${timeout_poll} \
-+ 127.0.0.1 >/dev/null &
- sleep 0.1
--pids[1]=$!
- chk_msk_nr 2 "after MPC handshake "
- chk_msk_remote_key_nr 2 "....chk remote_key"
- chk_msk_fallback_nr 0 "....chk no fallback"
- flush_pids
-
-
--echo "a" | ip netns exec $ns ./mptcp_connect -p 10001 -s TCP -l 0.0.0.0 -t 100 >/dev/null &
--pids[0]=$!
-+echo "a" | \
-+ timeout ${timeout_test} \
-+ ip netns exec $ns \
-+ ./mptcp_connect -p 10001 -l -s TCP -t ${timeout_poll} \
-+ 0.0.0.0 >/dev/null &
- sleep 0.1
--echo "b" | ip netns exec $ns ./mptcp_connect -p 10001 127.0.0.1 -j -t 100 >/dev/null &
--pids[1]=$!
-+echo "b" | \
-+ timeout ${timeout_test} \
-+ ip netns exec $ns \
-+ ./mptcp_connect -p 10001 -j -t ${timeout_poll} \
-+ 127.0.0.1 >/dev/null &
- sleep 0.1
- chk_msk_fallback_nr 1 "check fallback"
- flush_pids
-
- NR_CLIENTS=100
- for I in `seq 1 $NR_CLIENTS`; do
-- echo "a" | ip netns exec $ns ./mptcp_connect -p $((I+10001)) -l 0.0.0.0 -t 100 -w 10 >/dev/null &
-- pids[$((I*2))]=$!
-+ echo "a" | \
-+ timeout ${timeout_test} \
-+ ip netns exec $ns \
-+ ./mptcp_connect -p $((I+10001)) -l -w 10 \
-+ -t ${timeout_poll} 0.0.0.0 >/dev/null &
- done
- sleep 0.1
-
- for I in `seq 1 $NR_CLIENTS`; do
-- echo "b" | ip netns exec $ns ./mptcp_connect -p $((I+10001)) 127.0.0.1 -t 100 -w 10 >/dev/null &
-- pids[$((I*2 + 1))]=$!
-+ echo "b" | \
-+ timeout ${timeout_test} \
-+ ip netns exec $ns \
-+ ./mptcp_connect -p $((I+10001)) -w 10 \
-+ -t ${timeout_poll} 127.0.0.1 >/dev/null &
- done
- sleep 1.5
-
-diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
-index 987a914ee0df..4d94c4e81d49 100755
---- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
-+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
-@@ -11,7 +11,8 @@ cin=""
- cout=""
- ksft_skip=4
- capture=false
--timeout=30
-+timeout_poll=30
-+timeout_test=$((timeout_poll * 2 + 1))
- ipv6=true
- ethtool_random_on=true
- tc_delay="$((RANDOM%50))"
-@@ -269,7 +270,7 @@ check_mptcp_disabled()
- ip netns exec ${disabled_ns} sysctl -q net.mptcp.enabled=0
-
- local err=0
-- LANG=C ip netns exec ${disabled_ns} ./mptcp_connect -t $timeout -p 10000 -s MPTCP 127.0.0.1 < "$cin" 2>&1 | \
-+ LANG=C ip netns exec ${disabled_ns} ./mptcp_connect -p 10000 -s MPTCP 127.0.0.1 < "$cin" 2>&1 | \
- grep -q "^socket: Protocol not available$" && err=1
- ip netns delete ${disabled_ns}
-
-@@ -411,14 +412,20 @@ do_transfer()
- local stat_cookietx_last=$(ip netns exec ${listener_ns} nstat -z -a TcpExtSyncookiesSent | while read a count c rest ;do echo $count;done)
- local stat_cookierx_last=$(ip netns exec ${listener_ns} nstat -z -a TcpExtSyncookiesRecv | while read a count c rest ;do echo $count;done)
-
-- ip netns exec ${listener_ns} ./mptcp_connect -t $timeout -l -p $port -s ${srv_proto} $extra_args $local_addr < "$sin" > "$sout" &
-+ timeout ${timeout_test} \
-+ ip netns exec ${listener_ns} \
-+ ./mptcp_connect -t ${timeout_poll} -l -p $port -s ${srv_proto} \
-+ $extra_args $local_addr < "$sin" > "$sout" &
- local spid=$!
-
- wait_local_port_listen "${listener_ns}" "${port}"
-
- local start
- start=$(date +%s%3N)
-- ip netns exec ${connector_ns} ./mptcp_connect -t $timeout -p $port -s ${cl_proto} $extra_args $connect_addr < "$cin" > "$cout" &
-+ timeout ${timeout_test} \
-+ ip netns exec ${connector_ns} \
-+ ./mptcp_connect -t ${timeout_poll} -p $port -s ${cl_proto} \
-+ $extra_args $connect_addr < "$cin" > "$cout" &
- local cpid=$!
-
- wait $cpid
-diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-index 0eae628d1ffd..1a9c1c0a5692 100755
---- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
-+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
-@@ -8,7 +8,8 @@ cin=""
- cinsent=""
- cout=""
- ksft_skip=4
--timeout=30
-+timeout_poll=30
-+timeout_test=$((timeout_poll * 2 + 1))
- mptcp_connect=""
- capture=0
-
-@@ -249,17 +250,26 @@ do_transfer()
- local_addr="0.0.0.0"
- fi
-
-- ip netns exec ${listener_ns} $mptcp_connect -t $timeout -l -p $port \
-- -s ${srv_proto} ${local_addr} < "$sin" > "$sout" &
-+ timeout ${timeout_test} \
-+ ip netns exec ${listener_ns} \
-+ $mptcp_connect -t ${timeout_poll} -l -p $port -s ${srv_proto} \
-+ ${local_addr} < "$sin" > "$sout" &
- spid=$!
-
- sleep 1
-
- if [ "$test_link_fail" -eq 0 ];then
-- ip netns exec ${connector_ns} $mptcp_connect -t $timeout -p $port -s ${cl_proto} $connect_addr < "$cin" > "$cout" &
-+ timeout ${timeout_test} \
-+ ip netns exec ${connector_ns} \
-+ $mptcp_connect -t ${timeout_poll} -p $port -s ${cl_proto} \
-+ $connect_addr < "$cin" > "$cout" &
- else
-- ( cat "$cin" ; sleep 2; link_failure $listener_ns ; cat "$cin" ) | tee "$cinsent" | \
-- ip netns exec ${connector_ns} $mptcp_connect -t $timeout -p $port -s ${cl_proto} $connect_addr > "$cout" &
-+ ( cat "$cin" ; sleep 2; link_failure $listener_ns ; cat "$cin" ) | \
-+ tee "$cinsent" | \
-+ timeout ${timeout_test} \
-+ ip netns exec ${connector_ns} \
-+ $mptcp_connect -t ${timeout_poll} -p $port -s ${cl_proto} \
-+ $connect_addr > "$cout" &
- fi
- cpid=$!
-
-diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
-index 8fcb28927818..ce832b443475 100755
---- a/tools/testing/selftests/net/mptcp/simult_flows.sh
-+++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
-@@ -7,7 +7,8 @@ ns2="ns2-$rndh"
- ns3="ns3-$rndh"
- capture=false
- ksft_skip=4
--timeout=30
-+timeout_poll=30
-+timeout_test=$((timeout_poll * 2 + 1))
- test_cnt=1
- ret=0
- bail=0
-@@ -157,14 +158,20 @@ do_transfer()
- sleep 1
- fi
-
-- ip netns exec ${ns3} ./mptcp_connect -jt $timeout -l -p $port 0.0.0.0 < "$sin" > "$sout" &
-+ timeout ${timeout_test} \
-+ ip netns exec ${ns3} \
-+ ./mptcp_connect -jt ${timeout_poll} -l -p $port \
-+ 0.0.0.0 < "$sin" > "$sout" &
- local spid=$!
-
- wait_local_port_listen "${ns3}" "${port}"
-
- local start
- start=$(date +%s%3N)
-- ip netns exec ${ns1} ./mptcp_connect -jt $timeout -p $port 10.0.3.3 < "$cin" > "$cout" &
-+ timeout ${timeout_test} \
-+ ip netns exec ${ns1} \
-+ ./mptcp_connect -jt ${timeout_poll} -p $port \
-+ 10.0.3.3 < "$cin" > "$cout" &
- local cpid=$!
-
- wait $cpid
---
-2.35.1
-
+++ /dev/null
-From 7751433e2e0357d3d5cb881f865f508af98599d3 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 27 Jun 2022 18:02:41 -0700
-Subject: selftests: mptcp: more stable diag tests
-
-From: Paolo Abeni <pabeni@redhat.com>
-
-[ Upstream commit 42fb6cddec3b306c9f6ef136b6438e0de1836431 ]
-
-The mentioned test-case still use an hard-coded-len sleep to
-wait for a relative large number of connection to be established.
-
-On very slow VM and with debug build such timeout could be exceeded,
-causing failures in our CI.
-
-Address the issue polling for the expected condition several times,
-up to an unreasonable high amount of time. On reasonably fast system
-the self-tests will be faster then before, on very slow one we will
-still catch the correct condition.
-
-Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/net/mptcp/diag.sh | 48 +++++++++++++++++++----
- 1 file changed, 40 insertions(+), 8 deletions(-)
-
-diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh
-index ff821025d309..49dfabded1d4 100755
---- a/tools/testing/selftests/net/mptcp/diag.sh
-+++ b/tools/testing/selftests/net/mptcp/diag.sh
-@@ -61,6 +61,39 @@ chk_msk_nr()
- __chk_nr "grep -c token:" $*
- }
-
-+wait_msk_nr()
-+{
-+ local condition="grep -c token:"
-+ local expected=$1
-+ local timeout=20
-+ local msg nr
-+ local max=0
-+ local i=0
-+
-+ shift 1
-+ msg=$*
-+
-+ while [ $i -lt $timeout ]; do
-+ nr=$(ss -inmHMN $ns | $condition)
-+ [ $nr == $expected ] && break;
-+ [ $nr -gt $max ] && max=$nr
-+ i=$((i + 1))
-+ sleep 1
-+ done
-+
-+ printf "%-50s" "$msg"
-+ if [ $i -ge $timeout ]; then
-+ echo "[ fail ] timeout while expecting $expected max $max last $nr"
-+ ret=$test_cnt
-+ elif [ $nr != $expected ]; then
-+ echo "[ fail ] expected $expected found $nr"
-+ ret=$test_cnt
-+ else
-+ echo "[ ok ]"
-+ fi
-+ test_cnt=$((test_cnt+1))
-+}
-+
- chk_msk_fallback_nr()
- {
- __chk_nr "grep -c fallback" $*
-@@ -109,7 +142,7 @@ ip -n $ns link set dev lo up
- echo "a" | \
- timeout ${timeout_test} \
- ip netns exec $ns \
-- ./mptcp_connect -p 10000 -l -t ${timeout_poll} \
-+ ./mptcp_connect -p 10000 -l -t ${timeout_poll} -w 20 \
- 0.0.0.0 >/dev/null &
- wait_local_port_listen $ns 10000
- chk_msk_nr 0 "no msk on netns creation"
-@@ -117,7 +150,7 @@ chk_msk_nr 0 "no msk on netns creation"
- echo "b" | \
- timeout ${timeout_test} \
- ip netns exec $ns \
-- ./mptcp_connect -p 10000 -r 0 -t ${timeout_poll} \
-+ ./mptcp_connect -p 10000 -r 0 -t ${timeout_poll} -w 20 \
- 127.0.0.1 >/dev/null &
- wait_connected $ns 10000
- chk_msk_nr 2 "after MPC handshake "
-@@ -129,13 +162,13 @@ flush_pids
- echo "a" | \
- timeout ${timeout_test} \
- ip netns exec $ns \
-- ./mptcp_connect -p 10001 -l -s TCP -t ${timeout_poll} \
-+ ./mptcp_connect -p 10001 -l -s TCP -t ${timeout_poll} -w 20 \
- 0.0.0.0 >/dev/null &
- wait_local_port_listen $ns 10001
- echo "b" | \
- timeout ${timeout_test} \
- ip netns exec $ns \
-- ./mptcp_connect -p 10001 -r 0 -t ${timeout_poll} \
-+ ./mptcp_connect -p 10001 -r 0 -t ${timeout_poll} -w 20 \
- 127.0.0.1 >/dev/null &
- wait_connected $ns 10001
- chk_msk_fallback_nr 1 "check fallback"
-@@ -146,7 +179,7 @@ for I in `seq 1 $NR_CLIENTS`; do
- echo "a" | \
- timeout ${timeout_test} \
- ip netns exec $ns \
-- ./mptcp_connect -p $((I+10001)) -l -w 10 \
-+ ./mptcp_connect -p $((I+10001)) -l -w 20 \
- -t ${timeout_poll} 0.0.0.0 >/dev/null &
- done
- wait_local_port_listen $ns $((NR_CLIENTS + 10001))
-@@ -155,12 +188,11 @@ for I in `seq 1 $NR_CLIENTS`; do
- echo "b" | \
- timeout ${timeout_test} \
- ip netns exec $ns \
-- ./mptcp_connect -p $((I+10001)) -w 10 \
-+ ./mptcp_connect -p $((I+10001)) -w 20 \
- -t ${timeout_poll} 127.0.0.1 >/dev/null &
- done
--sleep 1.5
-
--chk_msk_nr $((NR_CLIENTS*2)) "many msk socket present"
-+wait_msk_nr $((NR_CLIENTS*2)) "many msk socket present"
- flush_pids
-
- exit $ret
---
-2.35.1
-
tcp-add-a-missing-nf_reset_ct-in-3whs-handling.patch
xen-gntdev-avoid-blocking-in-unmap_grant_pages.patch
drivers-cpufreq-add-missing-of_node_put-in-qoriq-cpu.patch
-selftests-mptcp-add-add_addr-timeout-test-case.patch
-selftests-mptcp-add-link-failure-test-case.patch
-selftests-mptcp-add-add_addr-ipv6-test-cases.patch
-selftests-mptcp-launch-mptcp_connect-with-timeout.patch
-selftests-mptcp-fix-diag-instability.patch
-selftests-mptcp-more-stable-diag-tests.patch
sit-use-min.patch
ipv6-sit-fix-ipip6_tunnel_get_prl-return-value.patch
hwmon-ibmaem-don-t-call-platform_device_del-if-platf.patch