Squash to "selftests: mptcp: remove id 0 subflow & address"
Subsystems (3)
PATCH 1/1 Squash to "selftests: mptcp: remove id 0 subflow & address"
Remove redundant code, put two tests into one.
Patch for "userspace pm remove id 0 subflow & address" v2.
--- .../testing/selftests/net/mptcp/mptcp_join.sh | 72 +++++++++---------- 1 file changed, 32 insertions(+), 40 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +32 -40
@@ -3339,7 +3339,13 @@ userspace_pm_rm_id_0_subflow_or_address_ns2() local tk tk=$(sed -n 's/.*\(token:\)\([[:digit:]]*\).*$/\2/p;q' "$evts_ns2") - ip netns exec $ns2 ./pm_nl_ctl "$1" token $tk id 0 + + if [ "$1" == "subflow" ]; then + ip netns exec $ns2 ./pm_nl_ctl dsf token $tk id 0 + elif [ "$1" == "address" ]; then + ip netns exec $ns2 ./pm_nl_ctl rem token $tk id 0 + fi + sleep 0.5 }
@@ -3458,45 +3464,31 @@ userspace_tests() wait $tests_pid fi - # userspace pm remove id 0 subflow - if reset_with_events "userspace pm remove id 0 subflow" && - continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then - set_userspace_pm $ns2 - pm_nl_set_limits $ns1 0 2 - speed=10 \ - run_tests $ns1 $ns2 10.0.1.1 & - local tests_pid=$! - wait_mpj $ns2 - userspace_pm_add_sf 10.0.1.2 0 - userspace_pm_add_sf 10.0.3.2 20 - chk_join_nr 2 2 2 - chk_mptcp_info subflows 2 subflows 2 - userspace_pm_rm_id_0_subflow_or_address_ns2 dsf - chk_mptcp_info subflows 1 subflows 1 - chk_rm_nr 0 2 - kill_events_pids - wait $tests_pid - fi - - # userspace pm remove id 0 address - if reset_with_events "userspace pm remove id 0 address" && - continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then - set_userspace_pm $ns2 - pm_nl_set_limits $ns1 0 2 - speed=10 \ - run_tests $ns1 $ns2 10.0.1.1 & - local tests_pid=$! - wait_mpj $ns2 - userspace_pm_add_sf 10.0.1.2 0 - userspace_pm_add_sf 10.0.3.2 20 - chk_join_nr 2 2 2 - chk_mptcp_info subflows 2 subflows 2 - userspace_pm_rm_id_0_subflow_or_address_ns2 rem - chk_mptcp_info subflows 1 subflows 1 - chk_rm_nr 2 0 - kill_events_pids - wait $tests_pid - fi + # userspace pm remove id 0 subflow & address + for type in "subflow" "address"; do + if reset_with_events "userspace pm remove id 0 $type" && + continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then + set_userspace_pm $ns2 + pm_nl_set_limits $ns1 0 2 + speed=10 \ + run_tests $ns1 $ns2 10.0.1.1 & + local tests_pid=$! + wait_mpj $ns2 + userspace_pm_add_sf 10.0.1.2 0 + userspace_pm_add_sf 10.0.3.2 20 + chk_join_nr 2 2 2 + chk_mptcp_info subflows 2 subflows 2 + userspace_pm_rm_id_0_subflow_or_address_ns2 "$type" + chk_mptcp_info subflows 1 subflows 1 + if [ "$type" == "subflow" ]; then + chk_rm_nr 0 2 + elif [ "$type" == "address" ]; then + chk_rm_nr 2 0 + fi + kill_events_pids + wait $tests_pid + fi + done } endpoint_tests()
Signature · 1 line
2.35.3
Re: Squash to "selftests: mptcp: remove id 0 subflow & address": Tests Results
Hi Geliang,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5693089235337216
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5693089235337216/summary/summary.txt
- KVM Validation: debug (except selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/6256039188758528
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6256039188758528/summary/summary.txt
- KVM Validation: normal (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5130139281915904
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5130139281915904/summary/summary.txt
- KVM Validation: debug (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/4848664305205248
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4848664305205248/summary/summary.txt
Initiator: Matthieu Baerts
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/cf8622126093
If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-debugFor more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)