linux-stable/tools/testing/selftests/net/tcp_ao
Dmitry Safonov b083d24fcf selftests/net: Amend per-netns counter checks
Selftests here check not only that connect()/accept() for
TCP-AO/TCP-MD5/non-signed-TCP combinations do/don't establish
connections, but also counters: those are per-AO-key, per-socket and
per-netns.

The counters are checked on the server's side, as the server listener
has TCP-AO/TCP-MD5/no keys for different peers. All tests run in
the same namespaces with the same veth pair, created in test_init().

After close() in both client and server, the sides go through
the regular FIN/ACK + FIN/ACK sequence, which goes in the background.
If the selftest has already started a new testing scenario, read
per-netns counters - it may fail in the end iff it doesn't expect
the TCPAOGood per-netns counters go up during the test.

Let's just kill both TCP-AO sides - that will avoid any asynchronous
background TCP-AO segments going to either sides.

Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/all/20240201132153.4d68f45e@kernel.org/T/#u
Fixes: 6f0c472a68 ("selftests/net: Add TCP-AO + TCP-MD5 + no sign listen socket tests")
Signed-off-by: Dmitry Safonov <dima@arista.com>
Link: https://lore.kernel.org/r/20240202-unsigned-md5-netns-counters-v1-1-8b90c37c0566@arista.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-02-06 10:35:29 +01:00
..
lib selftests/net: Repair RST passive reset selftest 2024-01-31 16:33:30 -08:00
.gitignore
Makefile selftests/net/tcp-ao: Use LDLIBS instead of LDFLAGS 2024-01-11 16:31:04 -08:00
bench-lookups.c selftest/tcp-ao: Set routes in a proper VRF table id 2024-01-02 13:27:48 +00:00
config selftests: tcp_ao: add a config file 2024-01-25 15:57:17 -08:00
connect-deny.c selftests/net: Fix various spelling mistakes in TCP-AO tests 2023-12-22 22:13:00 +00:00
connect.c
icmps-accept.c selftests/net: Add TCP-AO ICMPs accept test 2023-12-17 10:41:54 +00:00
icmps-discard.c selftests/net: Add TCP-AO ICMPs accept test 2023-12-17 10:41:54 +00:00
key-management.c selftests/net: Rectify key counters checks 2024-01-31 16:33:30 -08:00
restore.c selftests/net: Add TCP_REPAIR TCP-AO tests 2023-12-17 10:41:54 +00:00
rst.c selftests/net: Repair RST passive reset selftest 2024-01-31 16:33:30 -08:00
self-connect.c selftests/net: Add TCP-AO selfconnect/simultaneous connect test 2023-12-17 10:41:55 +00:00
seq-ext.c selftests/net: Add SEQ number extension test 2023-12-17 10:41:54 +00:00
setsockopt-closed.c selftests/net: remove unneeded semicolon 2023-12-23 00:23:30 +00:00
settings selftests: tcp_ao: set the timeout to 2 minutes 2024-01-25 16:00:50 -08:00
unsigned-md5.c selftests/net: Amend per-netns counter checks 2024-02-06 10:35:29 +01:00