selftests/bpf: Add verifier log tests for BPF_BTF_LOAD command
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 6 Apr 2023 23:42:05 +0000 (16:42 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 11 Apr 2023 16:05:44 +0000 (18:05 +0200)
commit054b6c7866c7a2537fffd4aa12d88aac47db60f9
treea04d8ff3fb9a1a04270e9166f56823169d702b0f
parentbe983f44274f575e42025130e3c62b8718b0a29a
selftests/bpf: Add verifier log tests for BPF_BTF_LOAD command

Add verifier log tests for BPF_BTF_LOAD command, which are very similar,
conceptually, to BPF_PROG_LOAD tests. These are two separate commands
dealing with verbose verifier log, so should be both tested separately.

Test that log_buf==NULL condition *does not* return -ENOSPC.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Lorenz Bauer <lmb@isovalent.com>
Link: https://lore.kernel.org/bpf/20230406234205.323208-20-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/verifier_log.c