diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-10-15 11:28:49 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-10-15 16:06:05 -0700 |
commit | c7566a69695cd3d8fe876c0da38a03a7472d3f56 (patch) | |
tree | 87cf6a2540dbbb1bca6286de1e1c5c06b65f650f /tools/testing/selftests/bpf/progs/btf__core_reloc_existence.c | |
parent | 01340e31915bc73bf33a8f912ff1b74d514b8d79 (diff) | |
download | linux-stable-c7566a69695cd3d8fe876c0da38a03a7472d3f56.tar.gz linux-stable-c7566a69695cd3d8fe876c0da38a03a7472d3f56.tar.bz2 linux-stable-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.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/btf__core_reloc_existence.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/btf__core_reloc_existence.c b/tools/testing/selftests/bpf/progs/btf__core_reloc_existence.c new file mode 100644 index 000000000000..0b62315ad46c --- /dev/null +++ b/tools/testing/selftests/bpf/progs/btf__core_reloc_existence.c @@ -0,0 +1,3 @@ +#include "core_reloc_types.h" + +void f(struct core_reloc_existence x) {} |