selftests: mptcp: join: update endpoint ops
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 5 Apr 2024 10:52:11 +0000 (12:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2024 10:53:21 +0000 (11:53 +0100)
commit571d79664a4a37bd66fbd80f714e9d66d2c2de35
tree9d3e45853a822c715eefc282ebacf1b39b583d05
parentb79e51c9994970699a0f488a7c121699d4595581
selftests: mptcp: join: update endpoint ops

This patch uses 'case' statements to simplify pm_nl_add_endpoint() and
pm_nl_check_endpoint(). And simplify pm_nl_check_endpoint() with
check_output() helper. Also update pm_nl_del_endpoint() to avoid the
'double quote' shellcheck warning.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/mptcp_join.sh