Skip to content

Commit

Permalink
selftests: mptcp: userspace pm: skip if not supported
Browse files Browse the repository at this point in the history
Selftests are supposed to run on any kernels, including the old ones not
supporting all MPTCP features.

One of them is the new MPTCP Userspace PM. We can skip these tests if
the feature is not supported.

Link: multipath-tcp/mptcp_net-next#368
Fixes: 259a834 ("selftests: mptcp: functional tests for the userspace PM type")
Signed-off-by: Matthieu Baerts <[email protected]>
  • Loading branch information
matttbe authored and intel-lab-lkp committed Apr 7, 2023
1 parent 31a4163 commit e31a0ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ cleanup_partial()
check_tools()
{
mptcp_lib_check_mptcp
mptcp_lib_check_kallsyms

if ! ip -Version &> /dev/null; then
echo "SKIP: Could not run test without ip tool"
Expand Down Expand Up @@ -3045,6 +3046,11 @@ fail_tests()

userspace_tests()
{
if ! mptcp_lib_kallsyms_has 'mptcp_userspace_pm_'; then
echo "userspace pm tests are not supported by the kernel: SKIP"
return
fi

# userspace pm type prevents add_addr
if reset "userspace pm type prevents add_addr"; then
set_userspace_pm $ns1
Expand Down
6 changes: 6 additions & 0 deletions tools/testing/selftests/net/mptcp/userspace_pm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
. "$(dirname "${0}")/mptcp_lib.sh"

mptcp_lib_check_mptcp
mptcp_lib_check_kallsyms

if ! mptcp_lib_kallsyms_has 'mptcp_userspace_pm_'; then
echo "userspace pm tests are not supported by the kernel: SKIP"
exit ${KSFT_SKIP}
fi

ip -Version > /dev/null 2>&1
if [ $? -ne 0 ];then
Expand Down

0 comments on commit e31a0ab

Please sign in to comment.