selftests/bpf: Test "bpftool gen min_core_btf"
authorMauricio Vásquez <mauricio@kinvolk.io>
Tue, 15 Feb 2022 22:58:56 +0000 (17:58 -0500)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 16 Feb 2022 18:14:34 +0000 (10:14 -0800)
commit704c91e59fe045708aa3f11d0c2bf9c83e39d24c
treec21e843d3c3be73c57977cde514121d3b806ec4f
parent1d1ffbf7f0b261fd5dcac2cd40a92b9394df08f6
selftests/bpf: Test "bpftool gen min_core_btf"

This commit reuses the core_reloc test to check if the BTF files
generated with "bpftool gen min_core_btf" are correct. This introduces
test_core_btfgen() that runs all the core_reloc tests, but this time
the source BTF files are generated by using "bpftool gen min_core_btf".

The goal of this test is to check that the generated files are usable,
and not to check if the algorithm is creating an optimized BTF file.

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
Signed-off-by: Rafael David Tinoco <rafael.tinoco@aquasec.com>
Signed-off-by: Lorenzo Fontana <lorenzo.fontana@elastic.co>
Signed-off-by: Leonardo Di Donato <leonardo.didonato@elastic.co>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220215225856.671072-8-mauricio@kinvolk.io
tools/testing/selftests/bpf/prog_tests/core_reloc.c