diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-08-19 12:45:16 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-08-19 14:19:39 -0700 |
commit | 124a892d1c416dc4f639031afb79d47857d9b0b0 (patch) | |
tree | accca582aff803e67fe432b19bf482ca0b5c9d98 /tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c | |
parent | libbpf: Implement type-based CO-RE relocations support (diff) | |
download | linux-124a892d1c416dc4f639031afb79d47857d9b0b0.tar.xz linux-124a892d1c416dc4f639031afb79d47857d9b0b0.zip |
selftests/bpf: Test TYPE_EXISTS and TYPE_SIZE CO-RE relocations
Add selftests for TYPE_EXISTS and TYPE_SIZE relocations, testing correctness
of relocations and handling of type compatiblity/incompatibility.
If __builtin_preserve_type_info() is not supported by compiler, skip tests.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200819194519.3375898-3-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c b/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c index aba928fd60d3..145028b52ad8 100644 --- a/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c +++ b/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c @@ -3,6 +3,7 @@ #include <linux/bpf.h> #include <stdint.h> +#include <stdbool.h> #include <bpf/bpf_helpers.h> #include <bpf/bpf_core_read.h> @@ -11,6 +12,7 @@ char _license[] SEC("license") = "GPL"; struct { char in[256]; char out[256]; + bool skip; uint64_t my_pid_tgid; } data = {}; |