selftests/bpf: add CO-RE relocs struct flavors tests
authorAndrii Nakryiko <andriin@fb.com>
Wed, 7 Aug 2019 21:39:54 +0000 (14:39 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 7 Aug 2019 21:43:49 +0000 (14:43 -0700)
commit002d3afce65518dc5dfc398a37c2be2a6bf559c4
tree45f989fae4a4f266e5b8913ead75b31e7c1a791e
parentdf36e621418b0de4d4afec5f8002d45ee636bb5c
selftests/bpf: add CO-RE relocs struct flavors tests

Add tests verifying that BPF program can use various struct/union
"flavors" to extract data from the same target struct/union.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/core_reloc.c
tools/testing/selftests/bpf/progs/btf__core_reloc_flavors.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/btf__core_reloc_flavors__err_wrong_name.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/core_reloc_types.h [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_core_reloc_flavors.c [new file with mode: 0644]