summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/mptcp/mptcp_join.sh
diff options
context:
space:
mode:
authorMatthieu Baerts <matthieu.baerts@tessares.net>2023-07-30 11:05:17 +0300
committerJakub Kicinski <kuba@kernel.org>2023-08-01 06:11:53 +0300
commit1dc88d241f9260fac6477ad040a5f1edbc3c2968 (patch)
tree73eb2ba7ffb364318bb85bf826983e4194d9e31c /tools/testing/selftests/net/mptcp/mptcp_join.sh
parent9466df1a27d55842bec496d3a84e98ee938c31aa (diff)
downloadlinux-1dc88d241f9260fac6477ad040a5f1edbc3c2968.tar.xz
selftests: mptcp: pm_nl_ctl: always look for errors
If a Netlink command for the MPTCP path-managers is not valid, it is important to check if there are errors. If yes, they need to be reported instead of being ignored and exiting without errors. Now if no replies are expected, an ACK from the kernelspace is asked by the userspace in order to always expect a reply. We can use the same buffer that is currently always >1024 bytes. Then we can check if there is an error (err->error), print it if any and report the error. After this modification, it is required to mute expected errors in mptcp_join.sh and pm_netlink.sh selftests: - when trying to add a bad endpoint, e.g. duplicated - when trying to set the two limits above the hard limit Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Link: https://lore.kernel.org/r/20230730-upstream-net-next-20230728-mptcp-selftests-misc-v1-3-7e9cc530a9cd@tessares.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/mptcp/mptcp_join.sh')
-rwxr-xr-xtools/testing/selftests/net/mptcp/mptcp_join.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 136d20641fce..63658b0416fb 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -3452,7 +3452,7 @@ endpoint_tests()
chk_mptcp_info subflows 1 subflows 1
chk_mptcp_info add_addr_signal 1 add_addr_accepted 1
- pm_nl_add_endpoint $ns2 10.0.2.2 id 33
+ pm_nl_add_endpoint $ns2 10.0.2.2 id 33 2>/dev/null
pm_nl_check_endpoint "ID change is prevented" \
$ns2 10.0.2.2 id 1 flags implicit