]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
selftests/bpf: Add tests for ENUMVAL_EXISTS/ENUMVAL_VALUE relocations
authorAndrii Nakryiko <andriin@fb.com>
Wed, 19 Aug 2020 19:45:19 +0000 (12:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Aug 2020 21:19:39 +0000 (14:19 -0700)
commit3357490555eacd39c2bf3e355a0e435f658d806f
tree894182d69e4e76d2a0fc8d81390440874686ba92
parenteacaaed784e2c9da69dea3030c81062c1fd66a37
selftests/bpf: Add tests for ENUMVAL_EXISTS/ENUMVAL_VALUE relocations

Add tests validating existence and value relocations for enum value-based
relocations. If __builtin_preserve_enum_value() built-in is not supported,
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-6-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/core_reloc.c
tools/testing/selftests/bpf/progs/btf__core_reloc_enumval.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/btf__core_reloc_enumval___diff.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/btf__core_reloc_enumval___err_missing.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/btf__core_reloc_enumval___val3_missing.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/core_reloc_types.h
tools/testing/selftests/bpf/progs/test_core_reloc_enumval.c [new file with mode: 0644]