aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/tcp_ao/connect.c
diff options
context:
space:
mode:
authorDmitry Safonov <0x7f454c46@gmail.com>2025-03-19 03:13:35 +0000
committerJakub Kicinski <kuba@kernel.org>2025-03-25 06:10:29 -0700
commit1fe4221093d1b97b6972231b3db660c035ba156b (patch)
treeae94d39c0c8ed67fdde0d6149ab7ab56035804ed /tools/testing/selftests/net/tcp_ao/connect.c
parentselftests/net: Print TCP flags in more common format (diff)
downloadlinux-1fe4221093d1b97b6972231b3db660c035ba156b.tar.gz
linux-1fe4221093d1b97b6972231b3db660c035ba156b.zip
selftests/net: Provide tcp-ao counters comparison helper
Rename __test_tcp_ao_counters_cmp() into test_assert_counters_ao() and test_tcp_ao_key_counters_cmp() into test_assert_counters_key() as they are asserts, rather than just compare functions. Provide test_cmp_counters() helper, that's going to be used to compare ao_info and netns counters as a stop condition for polling the sockets. Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://patch.msgid.link/20250319-tcp-ao-selftests-polling-v2-2-da48040153d1@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/tcp_ao/connect.c')
-rw-r--r--tools/testing/selftests/net/tcp_ao/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/tcp_ao/connect.c b/tools/testing/selftests/net/tcp_ao/connect.c
index f1d8d29e393f..87647f38e7e6 100644
--- a/tools/testing/selftests/net/tcp_ao/connect.c
+++ b/tools/testing/selftests/net/tcp_ao/connect.c
@@ -71,7 +71,7 @@ static void *client_fn(void *arg)
nr_packets, after_aogood, before_aogood);
return NULL;
}
- if (test_tcp_ao_counters_cmp("connect", &ao1, &ao2, TEST_CNT_GOOD))
+ if (test_assert_counters("connect", &ao1, &ao2, TEST_CNT_GOOD))
return NULL;
test_ok("connect TCPAOGood %" PRIu64 "/%" PRIu64 "/%" PRIu64 " => %" PRIu64 "/%" PRIu64 "/%" PRIu64 ", sent %zu",