Skip to content

Commit dc1d564

Browse files
Geliang Tangintel-lab-lkp
authored andcommitted
selftests/mptcp: use path_manager instead of pm_type
This patch uses the newly added net.mptcp.path_manager instead of the old net.mptcp.pm_type for all path manager selftests in mptcp_join.sh and userspace_pm.sh. Signed-off-by: Geliang Tang <[email protected]>
1 parent 297d091 commit dc1d564

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

tools/testing/selftests/net/mptcp/mptcp_join.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ init_partial()
9999

100100
local netns
101101
for netns in "$ns1" "$ns2"; do
102-
ip netns exec $netns sysctl -q net.mptcp.pm_type=0 2>/dev/null || true
102+
ip netns exec $netns sysctl -q net.mptcp.path_manager="in-kernel" 2>/dev/null || true
103103
if $checksum; then
104104
ip netns exec $netns sysctl -q net.mptcp.checksum_enabled=1
105105
fi
@@ -1920,7 +1920,7 @@ set_userspace_pm()
19201920
{
19211921
local ns=$1
19221922

1923-
ip netns exec $ns sysctl -q net.mptcp.pm_type=1
1923+
ip netns exec $ns sysctl -q net.mptcp.path_manager="userspace"
19241924
}
19251925

19261926
subflows_tests()
@@ -3497,7 +3497,7 @@ userspace_tests()
34973497
{
34983498
# userspace pm type prevents add_addr
34993499
if reset "userspace pm type prevents add_addr" &&
3500-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3500+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
35013501
set_userspace_pm $ns1
35023502
pm_nl_set_limits $ns1 0 2
35033503
pm_nl_set_limits $ns2 0 2
@@ -3509,7 +3509,7 @@ userspace_tests()
35093509

35103510
# userspace pm type does not echo add_addr without daemon
35113511
if reset "userspace pm no echo w/o daemon" &&
3512-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3512+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
35133513
set_userspace_pm $ns2
35143514
pm_nl_set_limits $ns1 0 2
35153515
pm_nl_set_limits $ns2 0 2
@@ -3521,7 +3521,7 @@ userspace_tests()
35213521

35223522
# userspace pm type rejects join
35233523
if reset "userspace pm type rejects join" &&
3524-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3524+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
35253525
set_userspace_pm $ns1
35263526
pm_nl_set_limits $ns1 1 1
35273527
pm_nl_set_limits $ns2 1 1
@@ -3532,7 +3532,7 @@ userspace_tests()
35323532

35333533
# userspace pm type does not send join
35343534
if reset "userspace pm type does not send join" &&
3535-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3535+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
35363536
set_userspace_pm $ns2
35373537
pm_nl_set_limits $ns1 1 1
35383538
pm_nl_set_limits $ns2 1 1
@@ -3543,7 +3543,7 @@ userspace_tests()
35433543

35443544
# userspace pm type prevents mp_prio
35453545
if reset "userspace pm type prevents mp_prio" &&
3546-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3546+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
35473547
set_userspace_pm $ns1
35483548
pm_nl_set_limits $ns1 1 1
35493549
pm_nl_set_limits $ns2 1 1
@@ -3556,7 +3556,7 @@ userspace_tests()
35563556

35573557
# userspace pm type prevents rm_addr
35583558
if reset "userspace pm type prevents rm_addr" &&
3559-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3559+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
35603560
set_userspace_pm $ns1
35613561
set_userspace_pm $ns2
35623562
pm_nl_set_limits $ns1 0 1
@@ -3570,7 +3570,7 @@ userspace_tests()
35703570

35713571
# userspace pm add & remove address
35723572
if reset_with_events "userspace pm add & remove address" &&
3573-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3573+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
35743574
set_userspace_pm $ns1
35753575
pm_nl_set_limits $ns2 2 2
35763576
{ speed=5 \
@@ -3603,7 +3603,7 @@ userspace_tests()
36033603

36043604
# userspace pm create destroy subflow
36053605
if reset_with_events "userspace pm create destroy subflow" &&
3606-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3606+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
36073607
set_userspace_pm $ns2
36083608
pm_nl_set_limits $ns1 0 1
36093609
{ speed=5 \
@@ -3631,7 +3631,7 @@ userspace_tests()
36313631

36323632
# userspace pm create id 0 subflow
36333633
if reset_with_events "userspace pm create id 0 subflow" &&
3634-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3634+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
36353635
set_userspace_pm $ns2
36363636
pm_nl_set_limits $ns1 0 1
36373637
{ speed=5 \
@@ -3652,7 +3652,7 @@ userspace_tests()
36523652

36533653
# userspace pm remove initial subflow
36543654
if reset_with_events "userspace pm remove initial subflow" &&
3655-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3655+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
36563656
set_userspace_pm $ns2
36573657
pm_nl_set_limits $ns1 0 1
36583658
{ speed=5 \
@@ -3676,7 +3676,7 @@ userspace_tests()
36763676

36773677
# userspace pm send RM_ADDR for ID 0
36783678
if reset_with_events "userspace pm send RM_ADDR for ID 0" &&
3679-
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3679+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
36803680
set_userspace_pm $ns1
36813681
pm_nl_set_limits $ns2 1 1
36823682
{ speed=5 \

tools/testing/selftests/net/mptcp/userspace_pm.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
mptcp_lib_check_mptcp
1414
mptcp_lib_check_kallsyms
1515

16-
if ! mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
16+
if ! mptcp_lib_has_file '/proc/sys/net/mptcp/path_manager'; then
1717
echo "userspace pm tests are not supported by the kernel: SKIP"
1818
exit ${KSFT_SKIP}
1919
fi
@@ -119,7 +119,7 @@ trap cleanup EXIT
119119
# Create and configure network namespaces for testing
120120
mptcp_lib_ns_init ns1 ns2
121121
for i in "$ns1" "$ns2" ;do
122-
ip netns exec "$i" sysctl -q net.mptcp.pm_type=1
122+
ip netns exec "$i" sysctl -q net.mptcp.path_manager="userspace"
123123
done
124124

125125
# "$ns1" ns2

0 commit comments

Comments
 (0)