]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/net: Add trace events matching to tcp_ao
authorDmitry Safonov <0x7f454c46@gmail.com>
Fri, 23 Aug 2024 22:04:58 +0000 (23:04 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 27 Aug 2024 21:11:27 +0000 (14:11 -0700)
commit586d87021f224b0434372f5b4418216e29b0a544
tree4455fded839323f5a798e878cbd97118ab970191
parent044e037051252ca8df07e1355bf4d7964645a6e8
selftests/net: Add trace events matching to tcp_ao

Setup trace points, add a new ftrace instance in order to not interfere
with the rest of the system, filtering by net namespace cookies.
Raise a new background thread that parses trace_pipe, matches them with
the list of expected events.

Wiring up trace events to selftests provides another insight if there is
anything unexpected happining in the tcp-ao code (i.e. key rotation when
it's not expected).

Note: in real programs libtraceevent should be used instead of this
manual labor of setting ftrace up and parsing. I'm not using it here
as I don't want to have an .so library dependency that one would have to
bring into VM or DUT (Device Under Test). Please, don't copy it over
into any real world programs, that aren't tests.

Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Link: https://patch.msgid.link/20240823-tcp-ao-selftests-upd-6-12-v4-8-05623636fe8c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
19 files changed:
tools/testing/selftests/net/tcp_ao/Makefile
tools/testing/selftests/net/tcp_ao/bench-lookups.c
tools/testing/selftests/net/tcp_ao/config
tools/testing/selftests/net/tcp_ao/connect-deny.c
tools/testing/selftests/net/tcp_ao/connect.c
tools/testing/selftests/net/tcp_ao/icmps-discard.c
tools/testing/selftests/net/tcp_ao/key-management.c
tools/testing/selftests/net/tcp_ao/lib/aolib.h
tools/testing/selftests/net/tcp_ao/lib/ftrace-tcp.c [new file with mode: 0644]
tools/testing/selftests/net/tcp_ao/lib/ftrace.c [new file with mode: 0644]
tools/testing/selftests/net/tcp_ao/lib/kconfig.c
tools/testing/selftests/net/tcp_ao/lib/setup.c
tools/testing/selftests/net/tcp_ao/lib/utils.c
tools/testing/selftests/net/tcp_ao/restore.c
tools/testing/selftests/net/tcp_ao/rst.c
tools/testing/selftests/net/tcp_ao/self-connect.c
tools/testing/selftests/net/tcp_ao/seq-ext.c
tools/testing/selftests/net/tcp_ao/setsockopt-closed.c
tools/testing/selftests/net/tcp_ao/unsigned-md5.c