selftests: mptcp: drop addr_nr_ns1/2 parameters
run_tests() accepts too many optional parameters. Before this modification, it was required to set all of then when only the last one had to be changed. That's not clear to see all these 0 and it makes the maintenance harder: run_tests $ns1 $ns2 10.0.1.1 1 2 3 slow Instead, the parameter can be set as an env var with a limited scope: foo=1 bar=2 next=3 \ run_tests $ns1 $ns2 10.0.1.1 slow This patch switches to key/value "addr_nr_ns1=*, addr_nr_ns2=*" instead of positional parameters addr_nr_ns1 and addr_nr_ns2 of do_transfer() and run_tests(). Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Geliang Tang <geliang.tang@suse.com> Signed-off-by: Mat Martineau <martineau@kernel.org> Link: https://lore.kernel.org/r/20230623-send-net-next-20230623-v1-5-a883213c8ba9@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0c93af1f89
commit
595ef566a2
@ -51,6 +51,8 @@ nr_blank=40
|
||||
|
||||
export FAILING_LINKS=""
|
||||
export test_linkfail=0
|
||||
export addr_nr_ns1=0
|
||||
export addr_nr_ns2=0
|
||||
|
||||
# generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) ||
|
||||
# (ip6 && (ip6[74] & 0xf0) == 0x30)'"
|
||||
@ -826,10 +828,8 @@ do_transfer()
|
||||
local cl_proto="$3"
|
||||
local srv_proto="$4"
|
||||
local connect_addr="$5"
|
||||
local addr_nr_ns1="$6"
|
||||
local addr_nr_ns2="$7"
|
||||
local speed="$8"
|
||||
local sflags="${9}"
|
||||
local speed="$6"
|
||||
local sflags="${7}"
|
||||
|
||||
local port=$((10000 + TEST_COUNT - 1))
|
||||
local cappid
|
||||
@ -1146,10 +1146,8 @@ run_tests()
|
||||
local listener_ns="$1"
|
||||
local connector_ns="$2"
|
||||
local connect_addr="$3"
|
||||
local addr_nr_ns1="${4:-0}"
|
||||
local addr_nr_ns2="${5:-0}"
|
||||
local speed="${6:-fast}"
|
||||
local sflags="${7:-""}"
|
||||
local speed="${4:-fast}"
|
||||
local sflags="${5:-""}"
|
||||
|
||||
local size
|
||||
|
||||
@ -1194,7 +1192,7 @@ run_tests()
|
||||
fi
|
||||
|
||||
do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr} \
|
||||
${addr_nr_ns1} ${addr_nr_ns2} ${speed} ${sflags}
|
||||
${speed} ${sflags}
|
||||
}
|
||||
|
||||
dump_stats()
|
||||
@ -1983,7 +1981,7 @@ subflows_error_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 0 1
|
||||
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 0 0 0
|
||||
fi
|
||||
|
||||
@ -1994,7 +1992,7 @@ subflows_error_tests()
|
||||
pm_nl_set_limits $ns2 0 2
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
fi
|
||||
|
||||
@ -2005,7 +2003,7 @@ subflows_error_tests()
|
||||
pm_nl_set_limits $ns2 0 2
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
fi
|
||||
|
||||
@ -2017,7 +2015,7 @@ subflows_error_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 0 1
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow &
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow &
|
||||
|
||||
# mpj subflow will be in TW after the reset
|
||||
wait_attempt_fail $ns2
|
||||
@ -2116,7 +2114,7 @@ signal_address_tests()
|
||||
|
||||
# the peer could possibly miss some addr notification, allow retransmission
|
||||
ip netns exec $ns1 sysctl -q net.mptcp.add_addr_timeout=1
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
|
||||
# It is not directly linked to the commit introducing this
|
||||
# symbol but for the parent one which is linked anyway.
|
||||
@ -2226,7 +2224,7 @@ add_addr_timeout_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
pm_nl_add_endpoint $ns1 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 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_tx_nr 4 4
|
||||
chk_add_nr 4 0
|
||||
@ -2237,7 +2235,7 @@ add_addr_timeout_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 0 0 slow
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 4 0
|
||||
fi
|
||||
@ -2248,7 +2246,7 @@ add_addr_timeout_tests()
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
|
||||
pm_nl_set_limits $ns2 2 2
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 speed_10
|
||||
run_tests $ns1 $ns2 10.0.1.1 speed_10
|
||||
chk_join_nr 2 2 2
|
||||
chk_add_nr 8 0
|
||||
fi
|
||||
@ -2259,7 +2257,7 @@ add_addr_timeout_tests()
|
||||
pm_nl_add_endpoint $ns1 10.0.12.1 flags signal
|
||||
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
|
||||
pm_nl_set_limits $ns2 2 2
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 speed_10
|
||||
run_tests $ns1 $ns2 10.0.1.1 speed_10
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 8 0
|
||||
fi
|
||||
@ -2272,7 +2270,8 @@ remove_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 0 1
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 -1 slow
|
||||
addr_nr_ns2=-1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_rm_tx_nr 1
|
||||
chk_rm_nr 1 1
|
||||
@ -2284,7 +2283,8 @@ remove_tests()
|
||||
pm_nl_set_limits $ns2 0 2
|
||||
pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 -2 slow
|
||||
addr_nr_ns2=-2 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 2 2 2
|
||||
chk_rm_nr 2 2
|
||||
fi
|
||||
@ -2294,7 +2294,8 @@ remove_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 -1 0 slow
|
||||
addr_nr_ns1=-1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 1 1
|
||||
chk_rm_nr 1 1 invert
|
||||
@ -2306,7 +2307,8 @@ remove_tests()
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
pm_nl_set_limits $ns2 1 2
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 -1 -1 slow
|
||||
addr_nr_ns1=-1 addr_nr_ns2=-1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 2 2 2
|
||||
chk_add_nr 1 1
|
||||
chk_rm_nr 1 1
|
||||
@ -2319,7 +2321,8 @@ remove_tests()
|
||||
pm_nl_set_limits $ns2 1 3
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 -1 -2 speed_10
|
||||
addr_nr_ns1=-1 addr_nr_ns2=-2 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 speed_10
|
||||
chk_join_nr 3 3 3
|
||||
chk_add_nr 1 1
|
||||
chk_rm_nr 2 2
|
||||
@ -2332,7 +2335,8 @@ remove_tests()
|
||||
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
|
||||
pm_nl_add_endpoint $ns1 10.0.4.1 flags signal
|
||||
pm_nl_set_limits $ns2 3 3
|
||||
run_tests $ns1 $ns2 10.0.1.1 -3 0 speed_10
|
||||
addr_nr_ns1=-3 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 speed_10
|
||||
chk_join_nr 3 3 3
|
||||
chk_add_nr 3 3
|
||||
chk_rm_nr 3 3 invert
|
||||
@ -2345,7 +2349,8 @@ remove_tests()
|
||||
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
|
||||
pm_nl_add_endpoint $ns1 10.0.14.1 flags signal
|
||||
pm_nl_set_limits $ns2 3 3
|
||||
run_tests $ns1 $ns2 10.0.1.1 -3 0 speed_10
|
||||
addr_nr_ns1=-3 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 speed_10
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 3 3
|
||||
chk_rm_nr 3 1 invert
|
||||
@ -2358,7 +2363,8 @@ remove_tests()
|
||||
pm_nl_set_limits $ns2 1 3
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 -8 -8 slow
|
||||
addr_nr_ns1=-8 addr_nr_ns2=-8 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 3 3 3
|
||||
chk_add_nr 1 1
|
||||
chk_rm_nr 1 3 invert simult
|
||||
@ -2371,7 +2377,8 @@ remove_tests()
|
||||
pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow id 150
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 -8 -8 slow
|
||||
addr_nr_ns1=-8 addr_nr_ns2=-8 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 3 3 3
|
||||
|
||||
if mptcp_lib_kversion_ge 5.18; then
|
||||
@ -2389,7 +2396,8 @@ remove_tests()
|
||||
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
|
||||
pm_nl_add_endpoint $ns1 10.0.4.1 flags signal
|
||||
pm_nl_set_limits $ns2 3 3
|
||||
run_tests $ns1 $ns2 10.0.1.1 -8 -8 slow
|
||||
addr_nr_ns1=-8 addr_nr_ns2=-8 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 3 3 3
|
||||
chk_add_nr 3 3
|
||||
chk_rm_nr 3 3 invert simult
|
||||
@ -2402,7 +2410,8 @@ remove_tests()
|
||||
pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
|
||||
pm_nl_add_endpoint $ns1 10.0.14.1 flags signal
|
||||
pm_nl_set_limits $ns2 3 3
|
||||
run_tests $ns1 $ns2 10.0.1.1 -8 0 slow
|
||||
addr_nr_ns1=-8 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 3 3
|
||||
chk_rm_nr 3 1 invert
|
||||
@ -2413,7 +2422,8 @@ remove_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 0 1
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 -9 slow
|
||||
addr_nr_ns2=-9 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_rm_nr 1 1
|
||||
fi
|
||||
@ -2423,7 +2433,8 @@ remove_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 -9 0 slow
|
||||
addr_nr_ns1=-9 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 1 1
|
||||
chk_rm_nr 1 1 invert
|
||||
@ -2436,7 +2447,8 @@ add_tests()
|
||||
if reset "add single subflow"; then
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 0 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 1 slow
|
||||
addr_nr_ns2=1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
fi
|
||||
|
||||
@ -2444,7 +2456,8 @@ add_tests()
|
||||
if reset "add signal address"; then
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 1 0 slow
|
||||
addr_nr_ns1=1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 1 1
|
||||
fi
|
||||
@ -2453,7 +2466,8 @@ add_tests()
|
||||
if reset "add multiple subflows"; then
|
||||
pm_nl_set_limits $ns1 0 2
|
||||
pm_nl_set_limits $ns2 0 2
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 2 slow
|
||||
addr_nr_ns2=2 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 2 2 2
|
||||
fi
|
||||
|
||||
@ -2461,7 +2475,8 @@ add_tests()
|
||||
if reset "add multiple subflows IPv6"; then
|
||||
pm_nl_set_limits $ns1 0 2
|
||||
pm_nl_set_limits $ns2 0 2
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 0 2 slow
|
||||
addr_nr_ns2=2 \
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 2 2 2
|
||||
fi
|
||||
|
||||
@ -2469,7 +2484,8 @@ add_tests()
|
||||
if reset "add multiple addresses IPv6"; then
|
||||
pm_nl_set_limits $ns1 0 2
|
||||
pm_nl_set_limits $ns2 2 2
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 2 0 slow
|
||||
addr_nr_ns1=2 \
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 2 2 2
|
||||
chk_add_nr 2 2
|
||||
fi
|
||||
@ -2482,14 +2498,14 @@ ipv6_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 0 1
|
||||
pm_nl_add_endpoint $ns2 dead:beef:3::2 dev ns2eth3 flags subflow
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 0 0 slow
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 1 1 1
|
||||
fi
|
||||
|
||||
# add_address, unused IPv6
|
||||
if reset "unused signal address IPv6"; then
|
||||
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 0 0 slow
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 0 0 0
|
||||
chk_add_nr 1 1
|
||||
fi
|
||||
@ -2499,7 +2515,7 @@ ipv6_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 0 0 slow
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 1 1
|
||||
fi
|
||||
@ -2509,7 +2525,8 @@ ipv6_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 -1 0 slow
|
||||
addr_nr_ns1=-1 \
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 1 1
|
||||
chk_rm_nr 1 1 invert
|
||||
@ -2521,7 +2538,8 @@ ipv6_tests()
|
||||
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
|
||||
pm_nl_set_limits $ns2 1 2
|
||||
pm_nl_add_endpoint $ns2 dead:beef:3::2 dev ns2eth3 flags subflow
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 -1 -1 slow
|
||||
addr_nr_ns1=-1 addr_nr_ns2=-1 \
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 2 2 2
|
||||
chk_add_nr 1 1
|
||||
chk_rm_nr 1 1
|
||||
@ -2622,7 +2640,7 @@ mixed_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 0 0 0
|
||||
fi
|
||||
|
||||
@ -2632,7 +2650,7 @@ mixed_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
pm_nl_add_endpoint $ns1 10.0.1.1 flags signal
|
||||
run_tests $ns1 $ns2 dead:beef:2::1 0 0 slow
|
||||
run_tests $ns1 $ns2 dead:beef:2::1 slow
|
||||
chk_join_nr 1 1 1
|
||||
fi
|
||||
|
||||
@ -2643,7 +2661,7 @@ mixed_tests()
|
||||
pm_nl_set_limits $ns2 1 4
|
||||
pm_nl_add_endpoint $ns2 dead:beef:2::2 flags subflow,fullmesh
|
||||
pm_nl_add_endpoint $ns1 10.0.1.1 flags signal
|
||||
run_tests $ns1 $ns2 dead:beef:2::1 0 0 slow
|
||||
run_tests $ns1 $ns2 dead:beef:2::1 slow
|
||||
chk_join_nr 1 1 1
|
||||
fi
|
||||
|
||||
@ -2655,7 +2673,8 @@ mixed_tests()
|
||||
pm_nl_set_limits $ns2 2 4
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 0 fullmesh_1 slow
|
||||
addr_nr_ns2=fullmesh_1 \
|
||||
run_tests $ns1 $ns2 dead:beef:1::1 slow
|
||||
chk_join_nr 4 4 4
|
||||
fi
|
||||
}
|
||||
@ -2668,7 +2687,7 @@ backup_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 0 1
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow,backup
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow nobackup
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow nobackup
|
||||
chk_join_nr 1 1 1
|
||||
chk_prio_nr 0 1
|
||||
fi
|
||||
@ -2679,7 +2698,7 @@ backup_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow backup
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow backup
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 1 1
|
||||
chk_prio_nr 1 1
|
||||
@ -2691,7 +2710,7 @@ backup_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal port 10100
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow backup
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow backup
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 1 1
|
||||
chk_prio_nr 1 1
|
||||
@ -2700,7 +2719,7 @@ backup_tests()
|
||||
if reset "mpc backup" &&
|
||||
continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then
|
||||
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow,backup
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 0 0 0
|
||||
chk_prio_nr 0 1
|
||||
fi
|
||||
@ -2709,7 +2728,7 @@ backup_tests()
|
||||
continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then
|
||||
pm_nl_add_endpoint $ns1 10.0.1.1 flags subflow,backup
|
||||
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow,backup
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 0 0 0
|
||||
chk_prio_nr 1 1
|
||||
fi
|
||||
@ -2717,7 +2736,7 @@ backup_tests()
|
||||
if reset "mpc switch to backup" &&
|
||||
continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then
|
||||
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow backup
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow backup
|
||||
chk_join_nr 0 0 0
|
||||
chk_prio_nr 0 1
|
||||
fi
|
||||
@ -2726,7 +2745,7 @@ backup_tests()
|
||||
continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then
|
||||
pm_nl_add_endpoint $ns1 10.0.1.1 flags subflow
|
||||
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow backup
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow backup
|
||||
chk_join_nr 0 0 0
|
||||
chk_prio_nr 1 1
|
||||
fi
|
||||
@ -2815,7 +2834,8 @@ add_addr_ports_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal port 10100
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 -1 0 slow
|
||||
addr_nr_ns1=-1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 1 1 1
|
||||
chk_add_nr 1 1 1
|
||||
chk_rm_nr 1 1 invert
|
||||
@ -2831,7 +2851,8 @@ add_addr_ports_tests()
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal port 10100
|
||||
pm_nl_set_limits $ns2 1 2
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 -1 -1 slow
|
||||
addr_nr_ns1=-1 addr_nr_ns2=-1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 2 2 2
|
||||
chk_add_nr 1 1 1
|
||||
chk_rm_nr 1 1
|
||||
@ -2844,7 +2865,8 @@ add_addr_ports_tests()
|
||||
pm_nl_set_limits $ns2 1 3
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
pm_nl_add_endpoint $ns2 10.0.4.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 -8 -2 slow
|
||||
addr_nr_ns1=-8 addr_nr_ns2=-2 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 3 3 3
|
||||
chk_add_nr 1 1
|
||||
chk_rm_nr 1 3 invert simult
|
||||
@ -3046,7 +3068,8 @@ fullmesh_tests()
|
||||
pm_nl_set_limits $ns2 1 4
|
||||
pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow,fullmesh
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow,fullmesh
|
||||
run_tests $ns1 $ns2 10.0.1.1 1 0 slow
|
||||
addr_nr_ns1=1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 4 4 4
|
||||
chk_add_nr 1 1
|
||||
fi
|
||||
@ -3058,7 +3081,8 @@ fullmesh_tests()
|
||||
pm_nl_set_limits $ns1 1 3
|
||||
pm_nl_set_limits $ns2 1 3
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 fullmesh_1 slow
|
||||
addr_nr_ns2=fullmesh_1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 3 3 3
|
||||
chk_add_nr 1 1
|
||||
fi
|
||||
@ -3070,7 +3094,8 @@ fullmesh_tests()
|
||||
pm_nl_set_limits $ns1 2 5
|
||||
pm_nl_set_limits $ns2 1 5
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 fullmesh_2 slow
|
||||
addr_nr_ns2=fullmesh_2 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 5 5 5
|
||||
chk_add_nr 1 1
|
||||
fi
|
||||
@ -3083,7 +3108,8 @@ fullmesh_tests()
|
||||
pm_nl_set_limits $ns1 2 4
|
||||
pm_nl_set_limits $ns2 1 4
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 fullmesh_2 slow
|
||||
addr_nr_ns2=fullmesh_2 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 4 4 4
|
||||
chk_add_nr 1 1
|
||||
fi
|
||||
@ -3094,7 +3120,8 @@ fullmesh_tests()
|
||||
pm_nl_set_limits $ns1 4 4
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow
|
||||
pm_nl_set_limits $ns2 4 4
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 1 slow fullmesh
|
||||
addr_nr_ns2=1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow fullmesh
|
||||
chk_join_nr 2 2 2
|
||||
chk_rm_nr 0 1
|
||||
fi
|
||||
@ -3105,7 +3132,8 @@ fullmesh_tests()
|
||||
pm_nl_set_limits $ns1 4 4
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow,fullmesh
|
||||
pm_nl_set_limits $ns2 4 4
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 fullmesh_1 slow nofullmesh
|
||||
addr_nr_ns2=fullmesh_1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow nofullmesh
|
||||
chk_join_nr 2 2 2
|
||||
chk_rm_nr 0 1
|
||||
fi
|
||||
@ -3116,7 +3144,8 @@ fullmesh_tests()
|
||||
pm_nl_set_limits $ns1 4 4
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow
|
||||
pm_nl_set_limits $ns2 4 4
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 1 slow backup,fullmesh
|
||||
addr_nr_ns2=1 run_tests \
|
||||
$ns1 $ns2 10.0.1.1 slow backup,fullmesh
|
||||
chk_join_nr 2 2 2
|
||||
chk_prio_nr 0 1
|
||||
chk_rm_nr 0 1
|
||||
@ -3128,7 +3157,7 @@ fullmesh_tests()
|
||||
pm_nl_set_limits $ns1 4 4
|
||||
pm_nl_set_limits $ns2 4 4
|
||||
pm_nl_add_endpoint $ns2 10.0.2.2 flags subflow,backup,fullmesh
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow nobackup,nofullmesh
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow nobackup,nofullmesh
|
||||
chk_join_nr 2 2 2
|
||||
chk_prio_nr 0 1
|
||||
chk_rm_nr 0 1
|
||||
@ -3138,16 +3167,16 @@ fullmesh_tests()
|
||||
fastclose_tests()
|
||||
{
|
||||
if reset_check_counter "fastclose test" "MPTcpExtMPFastcloseTx"; then
|
||||
test_linkfail=1024 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 fastclose_client
|
||||
test_linkfail=1024 addr_nr_ns2=fastclose_client \
|
||||
run_tests $ns1 $ns2 10.0.1.1
|
||||
chk_join_nr 0 0 0
|
||||
chk_fclose_nr 1 1
|
||||
chk_rst_nr 1 1 invert
|
||||
fi
|
||||
|
||||
if reset_check_counter "fastclose server test" "MPTcpExtMPFastcloseRx"; then
|
||||
test_linkfail=1024 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 fastclose_server
|
||||
test_linkfail=1024 addr_nr_ns2=fastclose_server \
|
||||
run_tests $ns1 $ns2 10.0.1.1
|
||||
chk_join_nr 0 0 0
|
||||
chk_fclose_nr 1 1 invert
|
||||
chk_rst_nr 1 1
|
||||
@ -3303,7 +3332,7 @@ userspace_tests()
|
||||
pm_nl_set_limits $ns1 1 1
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow backup
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow backup
|
||||
chk_join_nr 1 1 0
|
||||
chk_prio_nr 0 0
|
||||
fi
|
||||
@ -3316,7 +3345,8 @@ userspace_tests()
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
pm_nl_set_limits $ns2 0 1
|
||||
pm_nl_add_endpoint $ns2 10.0.3.2 flags subflow
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 -1 slow
|
||||
addr_nr_ns2=-1 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow
|
||||
chk_join_nr 0 0 0
|
||||
chk_rm_nr 0 0
|
||||
fi
|
||||
@ -3326,7 +3356,7 @@ userspace_tests()
|
||||
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
|
||||
set_userspace_pm $ns1
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 speed_10 &
|
||||
run_tests $ns1 $ns2 10.0.1.1 speed_10 &
|
||||
local tests_pid=$!
|
||||
wait_mpj $ns1
|
||||
userspace_pm_add_addr 10.0.2.1 10
|
||||
@ -3346,7 +3376,7 @@ userspace_tests()
|
||||
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
|
||||
set_userspace_pm $ns2
|
||||
pm_nl_set_limits $ns1 0 1
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 speed_10 &
|
||||
run_tests $ns1 $ns2 10.0.1.1 speed_10 &
|
||||
local tests_pid=$!
|
||||
wait_mpj $ns2
|
||||
userspace_pm_add_sf 10.0.3.2 20
|
||||
@ -3369,7 +3399,7 @@ endpoint_tests()
|
||||
pm_nl_set_limits $ns1 2 2
|
||||
pm_nl_set_limits $ns2 2 2
|
||||
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 slow 2>/dev/null &
|
||||
run_tests $ns1 $ns2 10.0.1.1 slow 2>/dev/null &
|
||||
|
||||
wait_mpj $ns1
|
||||
pm_nl_check_endpoint 1 "creation" \
|
||||
@ -3393,7 +3423,7 @@ endpoint_tests()
|
||||
pm_nl_set_limits $ns2 1 1
|
||||
pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow
|
||||
test_linkfail=4 \
|
||||
run_tests $ns1 $ns2 10.0.1.1 0 0 speed_20 2>/dev/null &
|
||||
run_tests $ns1 $ns2 10.0.1.1 speed_20 2>/dev/null &
|
||||
|
||||
wait_mpj $ns2
|
||||
chk_subflow_nr needtitle "before delete" 2
|
||||
|
Loading…
Reference in New Issue
Block a user