diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-11-01 15:28:09 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-11-04 16:06:56 +0100 |
commit | 8b1cb1c9601f835c025af5b3cf0e98c8048ad30b (patch) | |
tree | 85f2c8256c7046b8cfdb1d52182c4ae064f6f690 /tools/testing/selftests/bpf/progs/btf__core_reloc_bitfields___just_big_enough.c | |
parent | libbpf: Add support for field size relocations (diff) | |
download | linux-dev-8b1cb1c9601f835c025af5b3cf0e98c8048ad30b.tar.xz linux-dev-8b1cb1c9601f835c025af5b3cf0e98c8048ad30b.zip |
selftest/bpf: Add relocatable bitfield reading tests
Add a bunch of selftests verifying correctness of relocatable bitfield reading
support in libbpf. Both bpf_probe_read()-based and direct read-based bitfield
macros are tested. core_reloc.c "test_harness" is extended to support raw
tracepoint and new typed raw tracepoints as test BPF program types.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191101222810.1246166-5-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/btf__core_reloc_bitfields___just_big_enough.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/btf__core_reloc_bitfields___just_big_enough.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/btf__core_reloc_bitfields___just_big_enough.c b/tools/testing/selftests/bpf/progs/btf__core_reloc_bitfields___just_big_enough.c new file mode 100644 index 000000000000..e7c75a6953dd --- /dev/null +++ b/tools/testing/selftests/bpf/progs/btf__core_reloc_bitfields___just_big_enough.c @@ -0,0 +1,3 @@ +#include "core_reloc_types.h" + +void f(struct core_reloc_bitfields___just_big_enough x) {} |