Skip to content

Commit c8f021e

Browse files
Geliang Tangdavem330
authored andcommitted
selftests: mptcp: join: fix subflow_send_ack lookup
MPC backups tests will skip unexpected sometimes (For example, when compiling kernel with an older version of gcc, such as gcc-8), since static functions like mptcp_subflow_send_ack also be listed in /proc/kallsyms, with a 't' in front of it, not 'T' ('T' is for a global function): > grep "mptcp_subflow_send_ack" /proc/kallsyms 0000000000000000 T __pfx___mptcp_subflow_send_ack 0000000000000000 T __mptcp_subflow_send_ack 0000000000000000 t __pfx_mptcp_subflow_send_ack 0000000000000000 t mptcp_subflow_send_ack In this case, mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$" will be false, MPC backups tests will skip. This is not what we expected. The correct logic here should be: if mptcp_subflow_send_ack is not a global function in /proc/kallsyms, do these MPC backups tests. So a 'T' must be added in front of mptcp_subflow_send_ack. Fixes: 632978f ("selftests: mptcp: join: skip MPC backups tests if not supported") Cc: [email protected] Signed-off-by: Geliang Tang <[email protected]> Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b1dfc0f commit c8f021e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,7 +2776,7 @@ backup_tests()
27762776
fi
27772777

27782778
if reset "mpc backup" &&
2779-
continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then
2779+
continue_if mptcp_lib_kallsyms_doesnt_have "T mptcp_subflow_send_ack$"; then
27802780
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow,backup
27812781
speed=slow \
27822782
run_tests $ns1 $ns2 10.0.1.1
@@ -2785,7 +2785,7 @@ backup_tests()
27852785
fi
27862786

27872787
if reset "mpc backup both sides" &&
2788-
continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then
2788+
continue_if mptcp_lib_kallsyms_doesnt_have "T mptcp_subflow_send_ack$"; then
27892789
pm_nl_add_endpoint $ns1 10.0.1.1 flags subflow,backup
27902790
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow,backup
27912791
speed=slow \
@@ -2795,7 +2795,7 @@ backup_tests()
27952795
fi
27962796

27972797
if reset "mpc switch to backup" &&
2798-
continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then
2798+
continue_if mptcp_lib_kallsyms_doesnt_have "T mptcp_subflow_send_ack$"; then
27992799
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow
28002800
sflags=backup speed=slow \
28012801
run_tests $ns1 $ns2 10.0.1.1
@@ -2804,7 +2804,7 @@ backup_tests()
28042804
fi
28052805

28062806
if reset "mpc switch to backup both sides" &&
2807-
continue_if mptcp_lib_kallsyms_doesnt_have "mptcp_subflow_send_ack$"; then
2807+
continue_if mptcp_lib_kallsyms_doesnt_have "T mptcp_subflow_send_ack$"; then
28082808
pm_nl_add_endpoint $ns1 10.0.1.1 flags subflow
28092809
pm_nl_add_endpoint $ns2 10.0.1.2 flags subflow
28102810
sflags=backup speed=slow \

0 commit comments

Comments
 (0)