selftests/bpf: Add BPF object loading tests with explicit token passing
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 24 Jan 2024 02:21:23 +0000 (18:21 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 25 Jan 2024 00:21:03 +0000 (16:21 -0800)
commitd5baf0cac627fb3a00d9235955a388e5930b6d0e
tree4cd6e9ced35654a88e0658976f8cf7fd1a39d63e
parent6b434b61b4d9e0e59f2947ce0f58f6fb4de048d8
selftests/bpf: Add BPF object loading tests with explicit token passing

Add a few tests that attempt to load BPF object containing privileged
map, program, and the one requiring mandatory BTF uploading into the
kernel (to validate token FD propagation to BPF_BTF_LOAD command).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20240124022127.2379740-27-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/token.c
tools/testing/selftests/bpf/progs/priv_map.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/priv_prog.c [new file with mode: 0644]