bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andriin@fb.com>, Martin Lau <kafai@fb.com>,
	Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	john fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>,
	open list <linux-kernel@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: ensure snprintf_btf/bpf_iter tests compatibility with old vmlinux.h
Date: Tue, 29 Sep 2020 11:08:45 -0700	[thread overview]
Message-ID: <CAEf4Bzbj9ox+9jzf0ANjoMcygFN5k4dT=_28MPBFj5TEYKCb7A@mail.gmail.com> (raw)
In-Reply-To: <1601379151-21449-3-git-send-email-alan.maguire@oracle.com>

On Tue, Sep 29, 2020 at 5:26 AM Alan Maguire <alan.maguire@oracle.com> 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@gmail.com>
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---

That works, thanks!

Acked-by: Andrii Nakryiko <andriin@fb.com>

>  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
>

[...]

  reply	other threads:[~2020-09-29 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 11:32 [PATCH bpf-next 0/2] selftests/bpf: BTF-based kernel data display fixes Alan Maguire
2020-09-29 11:32 ` [PATCH bpf-next 1/2] selftests/bpf: fix unused-result warning in snprintf_btf.c Alan Maguire
2020-09-29 11:32 ` [PATCH bpf-next 2/2] selftests/bpf: ensure snprintf_btf/bpf_iter tests compatibility with old vmlinux.h Alan Maguire
2020-09-29 18:08   ` Andrii Nakryiko [this message]
2020-09-29 18:20 ` [PATCH bpf-next 0/2] selftests/bpf: BTF-based kernel data display fixes patchwork-bot+bpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEf4Bzbj9ox+9jzf0ANjoMcygFN5k4dT=_28MPBFj5TEYKCb7A@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=alan.maguire@oracle.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).