[SRU][G, H][PATCH 2/3] UBUNTU: SAUCE: selftests: Skip BPF seftests by default

Seth Forshee seth.forshee at canonical.com
Wed Dec 16 19:13:20 UTC 2020


On Wed, Dec 16, 2020 at 07:52:37AM -0800, Kamal Mostafa wrote:
> On Tue, Dec 15, 2020 at 6:05 PM Seth Forshee <seth.forshee at canonical.com>
> wrote:
> 
> > On Tue, Dec 15, 2020 at 09:51:11AM -0800, Kamal Mostafa wrote:
> > > On Tue, Dec 15, 2020 at 07:52:10AM -0600, Seth Forshee wrote:
> > > > On Mon, Dec 14, 2020 at 02:00:39PM -0800, Kamal Mostafa wrote:
> > > > > From: Mark Brown <broonie at kernel.org>
> > > > >
> > > > > BugLink: https://bugs.launchpad.net/bugs/1908144
> > > > >
> > > > > The BPF selftests have build time dependencies on cutting edge
> > versions
> >
> 
> <snip>
> 
> 
> > It builds it like this:
> >
> >  make -C linux/tools/testing/selftests TARGETS=bpf
> >
> > which is essentially the same as what the compileselftests target does.
> >
> > As I'm reading that code, if SKIP_TARGETS isn't already set it will
> > explicitly override the value passed for TARGETS to have the bpf
> > selftest removed. Based on a little experimenting with the makefile,
> > that seems to be exactly what happens. Changing it to this:
> >
> >  make -C tools/testing/selftests TARGETS=bpf SKIP_TARGETS=
> >
> > leaves bpf in TARGETS.
> >
> 
> Why fiddle with TARGETS and SKIP_TARGETS at all?  Note that simply this
> works -- with or without the disable patch(es) in place:
> 
>     make -C tools/testing/selftests/bpf

Using TARGETS is the documented way of running a subset of the tests (as
per Documentation/dev-tools/kselftest.rst), and is the way all of our
scripting that I'm aware of does it. The above probably works, I haven't
tried it, but could be confusing to someone trying to work with our
kernel source who tries to run the bpf selftests by doing what the
documentation tells them to do. Plus, we have to update our scripting
which already uses TARGETS.

In my opinion, if you want to remove the bpf self tests from the default
set of targets, just remove the "TARGETS += bpf" line near the top of
the makefile. But I'm not sure why we need to do that. Do we have
scripting that runs kselftests without setting TARGETS? If we do, why
not update that to use SKIP_TARGETS instead?

Seth



More information about the kernel-team mailing list