selftests/bpf: Add checking of raw type dump in BTF writer APIs selftests
mainline inclusion from mainline-5.11-rc1 commit 1306c980 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1306c980cf892bc17e7296d3e9ab8e9082f893a1 ------------------------------------------------- Add re-usable btf_helpers.{c,h} to provide BTF-related testing routines. Start with adding a raw BTF dumping helpers. Raw BTF dump is the most succinct and at the same time a very human-friendly way to validate exact contents of BTF types. Cross-validate raw BTF dump and writable BTF in a single selftest. Raw type dump checks also serve as a good self-documentation. Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Acked-by: NSong Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20201105043402.2530976-7-andrii@kernel.org (cherry picked from commit 1306c980) Signed-off-by: NWang Yufen <wangyufen@huawei.com>
Showing
想要评论请 注册 或 登录