]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add CO-RE relo test for TYPE_ID_LOCAL/TYPE_ID_TARGET
authorAndrii Nakryiko <andriin@fb.com>
Wed, 19 Aug 2020 19:45:17 +0000 (12:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Aug 2020 21:19:39 +0000 (14:19 -0700)
commitbb34de634929143ccc3d59b2fc553197eb2282b5
treecafddeaf11ed1724638274dddd6be1acf101c5f5
parent92cb201e26c7c2ef888bb9214acebba403f887c5
selftests/bpf: Add CO-RE relo test for TYPE_ID_LOCAL/TYPE_ID_TARGET

Add tests for BTF type ID relocations. To allow testing this, enhance
core_relo.c test runner to allow dynamic initialization of test inputs.
If Clang doesn't have necessary support for new functionality, test is
skipped.

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-4-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/core_reloc.c
tools/testing/selftests/bpf/progs/btf__core_reloc_type_id.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/btf__core_reloc_type_id___missing_targets.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/core_reloc_types.h
tools/testing/selftests/bpf/progs/test_core_reloc_type_based.c
tools/testing/selftests/bpf/progs/test_core_reloc_type_id.c [new file with mode: 0644]