selftests: mptcp: netlink: add 'limits' helpers
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 5 Apr 2024 10:52:08 +0000 (12:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2024 10:53:20 +0000 (11:53 +0100)
commit3188309c8ceb0611d0a6e9d1aca8464099695b8c
treee9596ac903dadb8595ad23bc0d3a3a4819a134ce
parent29aa32fee7d0fdc71221158719137c1f4f5de3b4
selftests: mptcp: netlink: add 'limits' helpers

The output format of 'ip mptcp limits' command is much different from
that of 'pm_nl_ctl limits' command.

This patch adds format_limits() helper to format the outputs of these
two commands to hide the difference. get_limits() has been added to show
the limits.

Use these two helpers in pm_netlink.sh to replace all 'pm_nl_ctl limits'
commands and outputs.

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/pm_netlink.sh