]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add test for libbpf_bpf_link_type_str
authorDaniel Müller <deso@posteo.net>
Mon, 23 May 2022 23:04:27 +0000 (23:04 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 2 Jun 2022 23:26:36 +0000 (16:26 -0700)
commitef4b9ddb48977b102f64ea99e364a13903c0beea
tree10f8679341ab178b2ef28c45c56bc9dc5f6f35d2
parent53c7b7b2f6728e9c12d3c4c61e0f868a6a8c1264
selftests/bpf: Add test for libbpf_bpf_link_type_str

This change adds a test for libbpf_bpf_link_type_str. The test retrieves
all variants of the bpf_link_type enumeration using BTF and makes sure
that the function under test works as expected for them.

Signed-off-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20220523230428.3077108-12-deso@posteo.net
tools/testing/selftests/bpf/prog_tests/libbpf_str.c