selftests/bpf: Tests for btf_dedup_resolve_fwds
authorEduard Zingerman <eddyz87@gmail.com>
Wed, 9 Nov 2022 14:26:11 +0000 (16:26 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 10 Nov 2022 04:45:21 +0000 (20:45 -0800)
commit99e18fad5ff79eea2ea9ec7e6d800b286552e005
tree749dd45cd33258782cf8bd6e74db41b6e9370955
parent082108fd6932772deb7e329f118687b4c03fc6a5
selftests/bpf: Tests for btf_dedup_resolve_fwds

Tests to verify the following behavior of `btf_dedup_resolve_fwds`:
- remapping for struct forward declarations;
- remapping for union forward declarations;
- no remapping if forward declaration kind does not match similarly
  named struct or union declaration;
- no remapping if forward declaration name is ambiguous;
- base ids are considered for fwd resolution in split btf scenario.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20221109142611.879983-4-eddyz87@gmail.com
tools/testing/selftests/bpf/prog_tests/btf.c
tools/testing/selftests/bpf/prog_tests/btf_dedup_split.c