Commit 78a2540e authored by Martin KaFai Lau's avatar Martin KaFai Lau Committed by Alexei Starovoitov

tools/bpf: Add tests for BTF_KIND_FUNC_PROTO and BTF_KIND_FUNC

This patch adds unit tests for BTF_KIND_FUNC_PROTO and
BTF_KIND_FUNC to test_btf.
Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
Signed-off-by: default avatarYonghong Song <yhs@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 781e775e
...@@ -165,6 +165,10 @@ static int btf_parse_type_sec(struct btf *btf, btf_print_fn_t err_log) ...@@ -165,6 +165,10 @@ static int btf_parse_type_sec(struct btf *btf, btf_print_fn_t err_log)
case BTF_KIND_ENUM: case BTF_KIND_ENUM:
next_type += vlen * sizeof(struct btf_enum); next_type += vlen * sizeof(struct btf_enum);
break; break;
case BTF_KIND_FUNC_PROTO:
next_type += vlen * sizeof(struct btf_param);
break;
case BTF_KIND_FUNC:
case BTF_KIND_TYPEDEF: case BTF_KIND_TYPEDEF:
case BTF_KIND_PTR: case BTF_KIND_PTR:
case BTF_KIND_FWD: case BTF_KIND_FWD:
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment