aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_sz.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-10-15 11:28:49 -0700
committerAlexei Starovoitov <ast@kernel.org>2019-10-15 16:06:05 -0700
commitc7566a69695cd3d8fe876c0da38a03a7472d3f56 (patch)
tree87cf6a2540dbbb1bca6286de1e1c5c06b65f650f /tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_sz.c
parentlibbpf: Add BPF-side definitions of supported field relocation kinds (diff)
downloadlinux-dev-c7566a69695cd3d8fe876c0da38a03a7472d3f56.tar.xz
linux-dev-c7566a69695cd3d8fe876c0da38a03a7472d3f56.zip
selftests/bpf: Add field existence CO-RE relocs tests
Add a bunch of tests validating CO-RE is handling field existence relocation. Relaxed CO-RE relocation mode is activated for these new tests to prevent libbpf from rejecting BPF object for no-match relocation, even though test BPF program is not going to use that relocation, if field is missing. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20191015182849.3922287-6-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_sz.c')
-rw-r--r--tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_sz.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_sz.c b/tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_sz.c
new file mode 100644
index 000000000000..6ec7e6ec1c91
--- /dev/null
+++ b/tools/testing/selftests/bpf/progs/btf__core_reloc_existence___err_wrong_int_sz.c
@@ -0,0 +1,3 @@
+#include "core_reloc_types.h"
+
+void f(struct core_reloc_existence___err_wrong_int_sz x) {}