Commit 4aadde08 authored by Geliang Tang's avatar Geliang Tang Committed by Jakub Kicinski

selftests: mptcp: add fullmesh env var

Use a new env var fullmesh instead of passing 'fullmesh_*' to addr_nr_ns2.
It can be set with the actual value of addr_nr_ns2 now:

  addr_nr_ns2=fullmesh_1 \
          run_tests $ns1 $ns2 10.0.1.1

  ->

  fullmesh=1 \
          run_tests $ns1 $ns2 10.0.1.1.
Signed-off-by: default avatarGeliang Tang <geliang.tang@suse.com>
Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Link: https://lore.kernel.org/r/20230712-upstream-net-next-20230712-selftests-mptcp-use-local-env-v1-3-f1c8b62fbf95@tessares.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 080b7f57
...@@ -56,6 +56,7 @@ unset addr_nr_ns1 ...@@ -56,6 +56,7 @@ unset addr_nr_ns1
unset addr_nr_ns2 unset addr_nr_ns2
unset sflags unset sflags
unset fastclose unset fastclose
unset fullmesh
# generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) || # generated using "nfbpf_compile '(ip && (ip[54] & 0xf0) == 0x30) ||
# (ip6 && (ip6[74] & 0xf0) == 0x30)'" # (ip6 && (ip6[74] & 0xf0) == 0x30)'"
...@@ -832,11 +833,12 @@ pm_nl_set_endpoint() ...@@ -832,11 +833,12 @@ pm_nl_set_endpoint()
local addr_nr_ns1=${addr_nr_ns1:-0} local addr_nr_ns1=${addr_nr_ns1:-0}
local addr_nr_ns2=${addr_nr_ns2:-0} local addr_nr_ns2=${addr_nr_ns2:-0}
local sflags=${sflags:-""} local sflags=${sflags:-""}
local fullmesh=${fullmesh:-""}
local flags="subflow" local flags="subflow"
if [[ "${addr_nr_ns2}" = "fullmesh_"* ]]; then if [ -n "${fullmesh}" ]; then
flags="${flags},fullmesh" flags="${flags},fullmesh"
addr_nr_ns2=${addr_nr_ns2:9} addr_nr_ns2=${fullmesh}
fi fi
# let the mptcp subflow be established in background before # let the mptcp subflow be established in background before
...@@ -2689,7 +2691,7 @@ mixed_tests() ...@@ -2689,7 +2691,7 @@ mixed_tests()
pm_nl_set_limits $ns2 2 4 pm_nl_set_limits $ns2 2 4
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal
addr_nr_ns2=fullmesh_1 \ fullmesh=1 \
run_tests $ns1 $ns2 dead:beef:1::1 slow run_tests $ns1 $ns2 dead:beef:1::1 slow
chk_join_nr 4 4 4 chk_join_nr 4 4 4
fi fi
...@@ -3102,7 +3104,7 @@ fullmesh_tests() ...@@ -3102,7 +3104,7 @@ fullmesh_tests()
pm_nl_set_limits $ns1 1 3 pm_nl_set_limits $ns1 1 3
pm_nl_set_limits $ns2 1 3 pm_nl_set_limits $ns2 1 3
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
addr_nr_ns2=fullmesh_1 \ fullmesh=1 \
run_tests $ns1 $ns2 10.0.1.1 slow run_tests $ns1 $ns2 10.0.1.1 slow
chk_join_nr 3 3 3 chk_join_nr 3 3 3
chk_add_nr 1 1 chk_add_nr 1 1
...@@ -3115,7 +3117,7 @@ fullmesh_tests() ...@@ -3115,7 +3117,7 @@ fullmesh_tests()
pm_nl_set_limits $ns1 2 5 pm_nl_set_limits $ns1 2 5
pm_nl_set_limits $ns2 1 5 pm_nl_set_limits $ns2 1 5
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
addr_nr_ns2=fullmesh_2 \ fullmesh=2 \
run_tests $ns1 $ns2 10.0.1.1 slow run_tests $ns1 $ns2 10.0.1.1 slow
chk_join_nr 5 5 5 chk_join_nr 5 5 5
chk_add_nr 1 1 chk_add_nr 1 1
...@@ -3129,7 +3131,7 @@ fullmesh_tests() ...@@ -3129,7 +3131,7 @@ fullmesh_tests()
pm_nl_set_limits $ns1 2 4 pm_nl_set_limits $ns1 2 4
pm_nl_set_limits $ns2 1 4 pm_nl_set_limits $ns2 1 4
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
addr_nr_ns2=fullmesh_2 \ fullmesh=2 \
run_tests $ns1 $ns2 10.0.1.1 slow run_tests $ns1 $ns2 10.0.1.1 slow
chk_join_nr 4 4 4 chk_join_nr 4 4 4
chk_add_nr 1 1 chk_add_nr 1 1
...@@ -3153,7 +3155,7 @@ fullmesh_tests() ...@@ -3153,7 +3155,7 @@ fullmesh_tests()
pm_nl_set_limits $ns1 4 4 pm_nl_set_limits $ns1 4 4
pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow,fullmesh pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow,fullmesh
pm_nl_set_limits $ns2 4 4 pm_nl_set_limits $ns2 4 4
addr_nr_ns2=fullmesh_1 sflags=nofullmesh \ fullmesh=1 sflags=nofullmesh \
run_tests $ns1 $ns2 10.0.1.1 slow run_tests $ns1 $ns2 10.0.1.1 slow
chk_join_nr 2 2 2 chk_join_nr 2 2 2
chk_rm_nr 0 1 chk_rm_nr 0 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment