selftests/bpf: Test btf__load_vmlinux_btf/btf__load_module_btf APIs
authorHengqi Chen <hengqi.chen@gmail.com>
Sun, 15 Aug 2021 08:10:35 +0000 (16:10 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 17 Aug 2021 01:38:52 +0000 (18:38 -0700)
commitedce1a248670397f8d0be1f6967eab3c5c082013
treecae1669ce90ed5a1894665f382dcf470f1c210e0
parentbb57164920d738076bf91d65af35d8724526c21b
selftests/bpf: Test btf__load_vmlinux_btf/btf__load_module_btf APIs

Add test for btf__load_vmlinux_btf/btf__load_module_btf APIs. The test
loads bpf_testmod module BTF and check existence of a symbol which is
known to exist.

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210815081035.205879-1-hengqi.chen@gmail.com
tools/testing/selftests/bpf/prog_tests/btf_module.c [new file with mode: 0644]