BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Mykola Lysenko <nickolay.lysenko@gmail.com>, bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	martin.lau@linux.dev, 	song@kernel.org, yonghong.song@linux.dev,
	jolsa@kernel.org, memxor@gmail.com
Subject: Re: [RFC PATCH bpf-next v5 8/8] selftests/bpf: build each test runner instance in its own sub-make
Date: Thu, 06 Aug 2026 11:30:47 -0700	[thread overview]
Message-ID: <c3f59776953b04e20e18da57e22b9cae2db5c9b6.camel@gmail.com> (raw)
In-Reply-To: <8da8aa48afa6ef52c22f976793af75b334b189a1.camel@gmail.com>

On Thu, 2026-08-06 at 01:02 -0700, Eduard Zingerman wrote:

...

> > +# The default flavor's skeletons are also inputs of bench, test_maps,
> > +# xskxceiver, xdp_* and test_cpp; "default-skels" builds just those
> > +# without the test_progs test objects and binary.
> > +.PHONY: default-skels
> > +default-skels: $(RUNNER_PREREQS)
> > +	+$(Q)$(RUNNER_MAKE) RUNNER=test_progs FLAVOR= TESTS_DIR=prog_tests \
> > +		BPF_CC='$(CLANG)' BPF_CC_MSG=CLNG-BPF BPF_SYS_INCLUDES='$(CLANG_SYS_INCLUDES)'	\
> > +		BPF_CC_FLAGS='-O2 $(BPF_TARGET_ENDIAN) -mcpu=v3'		\
> > +		BPF_DEFINES=-DENABLE_ATOMICS_TESTS skels
> > +
> > +$(OUTPUT)/test_progs: $(RUNNER_PREREQS) default-skels FORCE
> > +	+$(Q)$(RUNNER_MAKE) RUNNER=test_progs FLAVOR= TESTS_DIR=prog_tests \
> > +		BPF_CC='$(CLANG)' BPF_CC_MSG=CLNG-BPF BPF_SYS_INCLUDES='$(CLANG_SYS_INCLUDES)'	\
> > +		BPF_CC_FLAGS='-O2 $(BPF_TARGET_ENDIAN) -mcpu=v3'		\
> > +		BPF_DEFINES=-DENABLE_ATOMICS_TESTS
> 
> Is there a way to reduce copy-paste between default-skels and
> test_progs? Why does test_progs depend on default-skels?

Overall, I don't like the default-skels dependency for `bench` and company.
Previously these depended only on a subset of skel.h/bpf.o files.
But idk if that could be avoided. One option is to extract Makefile.skel
with the rules necessary to build bpf object files, and include it from
Makefile.runner and from the main makefile. Making `bench` and others
depend on the exact set of skels they want. But I'm not sure I like this
option either.

Please think a bit about this thing, maybe you can come up with
something.

...

      reply	other threads:[~2026-08-06 18:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 17:01 [RFC PATCH bpf-next v5 0/8] selftests/bpf: restructure the Makefile as a layered build Mykola Lysenko
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 1/8] selftests/bpf: keep headers off the generic link command line Mykola Lysenko
2026-08-05 21:21   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 2/8] selftests/bpf: drop stale and no-op lines Mykola Lysenko
2026-08-05 21:28   ` Eduard Zingerman
2026-08-06  4:43     ` Mykola Lysenko
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 3/8] selftests/bpf: factor the permissive-mode skip suffix into a helper Mykola Lysenko
2026-08-04 17:21   ` sashiko-bot
2026-08-05  0:13     ` Mykola Lysenko
2026-08-05 21:33   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 4/8] selftests/bpf: generate the signing key and certificate once Mykola Lysenko
2026-08-05 22:03   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 5/8] selftests/bpf: generate verifier/tests.h in a regular recipe Mykola Lysenko
2026-08-05 22:11   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 6/8] selftests/bpf: extract BPF skeleton generation into a helper script Mykola Lysenko
2026-08-04 17:59   ` sashiko-bot
2026-08-05  1:40     ` Mykola Lysenko
2026-08-05 22:39   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 7/8] selftests/bpf: move shared build definitions into Makefile.buildvars Mykola Lysenko
2026-08-05 23:34   ` Eduard Zingerman
2026-08-06  4:51     ` Mykola Lysenko
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 8/8] selftests/bpf: build each test runner instance in its own sub-make Mykola Lysenko
2026-08-06  8:02   ` Eduard Zingerman
2026-08-06 18:30     ` Eduard Zingerman [this message]

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=c3f59776953b04e20e18da57e22b9cae2db5c9b6.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jolsa@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=nickolay.lysenko@gmail.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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