selftests/bpf: Add nested type to type based tests
authorDaniel Müller <deso@posteo.net>
Tue, 28 Jun 2022 16:01:26 +0000 (16:01 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 6 Jul 2022 04:15:19 +0000 (21:15 -0700)
commit537905c4b68fe3a32c4925122fe792eb2f594b73
tree0f5317c7f5f2ae891bb00d12a39e027c4a8a61f9
parentbed56a6dd4cbf76ff757679a9333f9d3a72ed7ec
selftests/bpf: Add nested type to type based tests

This change extends the type based tests with another struct type (in
addition to a_struct) to check relocations against: a_complex_struct.
This type is nested more deeply to provide additional coverage of
certain paths in the type match logic.

Signed-off-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220628160127.607834-10-deso@posteo.net
tools/testing/selftests/bpf/prog_tests/core_reloc.c
tools/testing/selftests/bpf/progs/core_reloc_types.h
tools/testing/selftests/bpf/progs/test_core_reloc_type_based.c