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

Kamal Mostafa kamal at canonical.com
Wed Dec 16 23:09:17 UTC 2020


On Wed, Dec 16, 2020 at 04:10:03PM -0600, Seth Forshee wrote:
> On Wed, Dec 16, 2020 at 01:40:14PM -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
> > of tools in the BPF ecosystem including LLVM which are more involved
> > to satisfy than more typical requirements like installing a package from
> > your distribution.  This causes issues for users looking at kselftest in
> > as a whole who find that a default build of kselftest fails and that
> > resolving this is time consuming and adds administrative overhead.  The
> > fast pace of BPF development and the need for a full BPF stack to do
> > substantial development or validation work on the code mean that people
> > working directly on it don't see a reasonable way to keep supporting
> > older environments without causing problems with the usability of the
> > BPF tests in BPF development so these requirements are unlikely to be
> > relaxed in the immediate future.
> > 
> > There is already support for skipping targets so in order to reduce the
> > barrier to entry for people interested in kselftest as a whole let's use
> > that to skip the BPF tests by default when people work with the top
> > level kselftest build system.  Users can still build the BPF selftests
> > as part of the wider kselftest build by specifying SKIP_TARGETS,
> > including setting an empty SKIP_TARGETS to build everything.  They can
> > also continue to build the BPF selftests individually in cases where
> > they are specifically focused on BPF.
> > 
> > This isn't ideal since it means people will need to take special steps
> > to build the BPF tests but the dependencies mean that realistically this
> > is already the case to some extent and it makes it easier for people to
> > pick up and work with the other selftests which is hopefully a net win.
> > 
> > Signed-off-by: Mark Brown <broonie at kernel.org>
> > Reference: https://lore.kernel.org/bpf/20201210185233.28091-1-broonie@kernel.org/
> > Signed-off-by: Kamal Mostafa <kamal at canonical.com>
> 
> I'm still opposed to this patch, and I've raised by objections upstream.
> 
> https://lore.kernel.org/bpf/X9qExiKXPVmk3BJI@ubuntu-x1/
> 

Ah, I didn't realize that your comments implied "opposed" to it!  :-)
Your upstream objection is well-stated.

Since we really only need [PATCH v2 3/3] to unbreak Ubuntu's
compileselftests target anyway -- How about if we were to apply just
the other two patches from this set, Seth?

    [SRU][G, H][PATCH v2 1/3] UBUNTU: SAUCE: selftests/bpf: Clarify build error if no vmlinux
    [SRU][G, H][PATCH v2 3/3] UBUNTU: disable building bpf selftests (no VMLINUX_BTF)

 -Kamal


> > ---
> >  tools/testing/selftests/Makefile | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> > index 1195bd85af38..195177ba44ab 100644
> > --- a/tools/testing/selftests/Makefile
> > +++ b/tools/testing/selftests/Makefile
> > @@ -71,8 +71,10 @@ TARGETS += zram
> >  TARGETS_HOTPLUG = cpu-hotplug
> >  TARGETS_HOTPLUG += memory-hotplug
> >  
> > -# User can optionally provide a TARGETS skiplist.
> > -SKIP_TARGETS ?=
> > +# User can optionally provide a TARGETS skiplist.  By default we skip
> > +# BPF since it has cutting edge build time dependencies which require
> > +# more effort to install.
> > +SKIP_TARGETS ?= bpf
> >  ifneq ($(SKIP_TARGETS),)
> >  	TMP := $(filter-out $(SKIP_TARGETS), $(TARGETS))
> >  	override TARGETS := $(TMP)
> > -- 
> > 2.17.1
> > 
> > 
> > -- 
> > kernel-team mailing list
> > kernel-team at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team



More information about the kernel-team mailing list