]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Reuse stderr parsing for libarena ASAN tests
authorEmil Tsalapatis <emil@etsalapatis.com>
Sun, 26 Apr 2026 19:03:38 +0000 (15:03 -0400)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 27 Apr 2026 01:12:22 +0000 (18:12 -0700)
commit554e4eb9e4b75358f73733e2be7a59aaf4b7875e
tree803d9494183fa691b0f88d017f42f1e6a0929c7f
parentb1487dc1b181ad6aaea95357030a421bb180d8e7
selftests/bpf: Reuse stderr parsing for libarena ASAN tests

Add code to directly test the output of libarena ASAN tests.
The code reuses testing infrastructure originally for BPF streams
to verify that ASAN emits call stacks when the selftests trigger
a memory error.

Since stderr() testing uses logic from test_progs, it is only
available on the test_progs-based selftest runner. The standalone
runner still uses internal ASAN state to verify access errors are
triaged as expected.

Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://lore.kernel.org/r/20260426190338.4615-9-emil@etsalapatis.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/libarena/selftests/st_asan_buddy.bpf.c
tools/testing/selftests/bpf/libarena/selftests/test_progs_compat.h [new file with mode: 0644]
tools/testing/selftests/bpf/prog_tests/libarena_asan.c
tools/testing/selftests/bpf/test_loader.c
tools/testing/selftests/bpf/test_progs.h