BPF List
 help / color / mirror / Atom feed
From: Artem Savkov <asavkov@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, jbenc@redhat.com
Subject: Re: [PATCH bpf-next] selftests/bpf: make libbpf_probe_prog_types testcase aware of kernel configuration
Date: Mon, 3 Oct 2022 08:56:24 +0200	[thread overview]
Message-ID: <YzqHmHRjxAc4Nndc@samus.usersys.redhat.com> (raw)
In-Reply-To: <CAEf4BzZpkgXi9Y6x-_-6mDDW12GvTj0Y_e7cpQMqF3dtiBBhpA@mail.gmail.com>

On Fri, Sep 30, 2022 at 04:06:41PM -0700, Andrii Nakryiko wrote:
> On Fri, Sep 30, 2022 at 4:09 AM Artem Savkov <asavkov@redhat.com> wrote:
> >
> > At the moment libbpf_probe_prog_types test iterates over all available
> > BPF_PROG_TYPE regardless of kernel configuration which can exclude some
> > of those. Unfortunately there is no direct way to tell which types are
> > available, but we can look at struct bpf_ctx_onvert to tell which ones
> > are available.
> >
> > Signed-off-by: Artem Savkov <asavkov@redhat.com>
> > ---
> 
> Many selftests assume correct kernel configuration which is encoded in
> config and config.<arch> files. So it seems fair to assume that all
> defined program types are available on kernel-under-test.

Ok. Wasn't sure if this is the assumption being made.

> If someone is running selftests under custom more minimal kernel they
> can use denylist to ignore specific prog type subtests?

Thanks for the suggestion. Denylist is a bit too broad in this case as
it means we'll be disabling the whole libbpf_probe_prog_types test while
only a single type is a problem. Looks like we'll have to live with a
downstream-only patch in this case.

-- 
 Artem


  reply	other threads:[~2022-10-03  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 11:09 [PATCH bpf-next] selftests/bpf: make libbpf_probe_prog_types testcase aware of kernel configuration Artem Savkov
2022-09-30 17:37 ` Jiri Olsa
2022-09-30 23:06 ` Andrii Nakryiko
2022-10-03  6:56   ` Artem Savkov [this message]
2022-10-04  0:03     ` Andrii Nakryiko
2022-10-06  7:27       ` Artem Savkov

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=YzqHmHRjxAc4Nndc@samus.usersys.redhat.com \
    --to=asavkov@redhat.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jbenc@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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