selftests/bpf: Add test for libbpf's custom log_buf behavior
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 9 Dec 2021 19:38:38 +0000 (11:38 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 10 Dec 2021 23:29:18 +0000 (15:29 -0800)
commit57e889269af3dd0609933e2550c4baee7a7eb84c
tree8293245bcd9f21d92d32fcbcd9aee831e0f782c2
parentdc94121b5ca17adaaabb7959c10d9c6ea504f7b1
selftests/bpf: Add test for libbpf's custom log_buf behavior

Add a selftest that validates that per-program and per-object log_buf
overrides work as expected. Also test same logic for low-level
bpf_prog_load() and bpf_btf_load() APIs.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211209193840.1248570-11-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/log_buf.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_log_buf.c [new file with mode: 0644]