Skip to content
Snippets Groups Projects
Commit cfe77683 authored by Alan Maguire's avatar Alan Maguire Committed by Alexei Starovoitov
Browse files

selftests/bpf: Ensure snprintf_btf/bpf_iter tests compatibility with old vmlinux.h


Andrii reports that bpf selftests relying on "struct btf_ptr" and BTF_F_*
values will not build as vmlinux.h for older kernels will not include
"struct btf_ptr" or the BTF_F_* enum values.  Undefine and redefine
them to work around this.

Fixes: b72091bd ("selftests/bpf: Add test for bpf_seq_printf_btf helper")
Fixes: 076a95f5 ("selftests/bpf: Add bpf_snprintf_btf helper tests")
Reported-by: default avatarAndrii Nakryiko <andrii.nakryiko@gmail.com>
Signed-off-by: default avatarAlan Maguire <alan.maguire@oracle.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/1601379151-21449-3-git-send-email-alan.maguire@oracle.com
parent 96c48058
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment