OSDN Git Service

tools/bpf: extends test_btf to test load/retrieve func_type info
authorYonghong Song <yhs@fb.com>
Mon, 19 Nov 2018 23:29:15 +0000 (15:29 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 20 Nov 2018 18:54:39 +0000 (10:54 -0800)
commit4798c4ba3ba94e4da37b2557dfda04f80a94e8d5
tree71603a1651b624d9f7386576053cd2dc9480c8ec
parent7e0d0fb5522a388700ceff723af98c47ffa8a0a9
tools/bpf: extends test_btf to test load/retrieve func_type info

A two function bpf program is loaded with btf and func_info.
After successful prog load, the bpf_get_info syscall is called
to retrieve prog info to ensure the types returned from the
kernel matches the types passed to the kernel from the
user space.

Several negative tests are also added to test loading/retriving
of func_type info.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_btf.c