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

Now that we have type-match logic in both libbpf and the kernel, this
change adjusts the existing BPF self tests to check this functionality.
Specifically, we extend the existing type-based tests to check the
previously introduced bpf_core_type_matches macro.

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-8-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