selftests: mptcp: join: check CURRESTAB counters
authorGeliang Tang <geliang.tang@linux.dev>
Fri, 22 Dec 2023 12:47:24 +0000 (13:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jan 2024 13:33:33 +0000 (13:33 +0000)
commit0bd962dd86b2e5d097fc42c7411818851eca2995
tree0a01326bc089278b4d43b84c2bb67132d41de8d7
parentc693a8516429908da3ea111b0caa3c042ab1e6e9
selftests: mptcp: join: check CURRESTAB counters

This patch adds a new helper chk_cestab_nr() to check the current
established connections counter MIB_CURRESTAB. Set the newly added
variables cestab_ns1 and cestab_ns2 to indicate how many connections
are expected in ns1 or ns2.

Invoke check_cestab() to check the counter during the connection in
do_transfer() and invoke chk_cestab_nr() to re-check it when the
connection closed. These checks are embedded in add_tests().

Signed-off-by: Geliang Tang <geliang.tang@linux.dev>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/mptcp_join.sh