Re: [PATCH bpf-next 2/2] selftests/bpf: ensure snprintf_btf/bpf_iter tests compatibility with old vmlinux.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 29, 2020 at 5:26 AM Alan Maguire <alan.maguire@xxxxxxxxxx> wrote:
>
> 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: b72091bd4ee4 ("selftests/bpf: Add test for bpf_seq_printf_btf helper")
> Fixes: 076a95f5aff2 ("selftests/bpf: Add bpf_snprintf_btf helper tests")
> Reported-by: Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>
> Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
> ---

That works, thanks!

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

>  tools/testing/selftests/bpf/progs/bpf_iter.h       | 23 ++++++++++++++++++
>  tools/testing/selftests/bpf/progs/btf_ptr.h        | 27 ++++++++++++++++++++++
>  .../selftests/bpf/progs/netif_receive_skb.c        |  2 +-
>  3 files changed, 51 insertions(+), 1 deletion(-)
>  create mode 100644 tools/testing/selftests/bpf/progs/btf_ptr.h
>

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux