From: sashiko-bot@kernel.org
To: "Mykola Lysenko" <nickolay.lysenko@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [RFC PATCH bpf-next v2 3/3] selftests/bpf: build each test runner instance in its own sub-make
Date: Tue, 21 Jul 2026 19:51:55 +0000 [thread overview]
Message-ID: <20260721195155.B78721F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260721194111.334795-4-nickolay.lysenko@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] In permissive mode, test objects are treated exclusively as order-only prerequisites, which completely breaks incremental test development by never relinking the test runner when test sources are modified.
--
--- Patch [3]: [RFC PATCH bpf-next v2 3/3] selftests/bpf: build each test runner instance in its own sub-make ---
commit f7cbf6f3b146270d8f7ba71d9ea0557ab2070208
Author: Mykola Lysenko <nickolay.lysenko@gmail.com>
selftests/bpf: build each test runner instance in its own sub-make
This commit refactors the bpf selftests build system to use a dedicated
Makefile.runner for each test runner instance, running them in separate
sub-makes. It aims to eliminate double-expansion complexity while fixing
parallel build races.
> diff --git a/tools/testing/selftests/bpf/Makefile.runner b/tools/testing/selftests/bpf/Makefile.runner
> new file mode 100644
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/Makefile.runner
[ ... ]
> +# In permissive mode, link whatever test objects were successfully built
> +# (their compilation may have been skipped); the wildcard in the recipe
> +# picks up the survivors at link time.
> +# Prerequisite order is also link order (test objects, extra objects,
> +# libbpf, lib objects).
> +$(OUTPUT)/$(BINARY): $(if $(PERMISSIVE_TESTS),,$(TEST_OBJS)) \
> + $(EXTRA_OBJS) $(BPFOBJ) $(LIB_OBJS) \
> + $(TRUNNER_BPFTOOL) $(OUTPUT)/veristat \
> + | extras $(BPF_OBJS) \
> + $(if $(PERMISSIVE_TESTS),$(TEST_OBJS))
[Severity: Medium]
Will this break incremental test development in permissive mode?
By placing TEST_OBJS exclusively after the order-only prerequisite pipe (|)
when PERMISSIVE_TESTS is active, make is instructed to not rebuild the target
when the test objects are updated.
If a developer modifies an existing test file while using BPF_STRICT_BUILD=0,
the test object will successfully recompile, but the test runner binary
(like test_progs) will not relink to include the new object. Does this cause
stale tests to be executed unknowingly?
> + $(call msg,BINARY,,$@)
> + $(Q)$(CC) $(CFLAGS) \
> + $(if $(PERMISSIVE_TESTS),$(wildcard $(TEST_OBJS))) \
> + $(filter %.a %.o,$^) \
> + $(LDLIBS) $(LLVM_LDLIBS) $(LDFLAGS) $(LLVM_LDFLAGS) -o $@
> + $(Q)ln -sf $(if $(FLAVOR),..,.)/tools/build/bpftool/$(USE_BOOTSTRAP)bpftool \
> + $(RDIR)/bpftool
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260721194111.334795-1-nickolay.lysenko@gmail.com?part=3
prev parent reply other threads:[~2026-07-21 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 19:41 [RFC PATCH bpf-next v2 0/3] selftests/bpf: restructure the Makefile as a layered build Mykola Lysenko
2026-07-21 19:41 ` [RFC PATCH bpf-next v2 1/3] selftests/bpf: extract BPF skeleton generation into a helper script Mykola Lysenko
2026-07-21 19:41 ` [RFC PATCH bpf-next v2 2/3] selftests/bpf: move shared build definitions into Makefile.buildvars Mykola Lysenko
2026-07-21 19:52 ` sashiko-bot
2026-07-21 19:41 ` [RFC PATCH bpf-next v2 3/3] selftests/bpf: build each test runner instance in its own sub-make Mykola Lysenko
2026-07-21 19:51 ` sashiko-bot [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=20260721195155.B78721F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=nickolay.lysenko@gmail.com \
--cc=sashiko-reviews@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.