From: sashiko-bot@kernel.org
To: "Ricardo B. Marlière" <rbm@suse.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v7 08/11] selftests/bpf: Allow test_progs to link with a partial object set
Date: Thu, 16 Apr 2026 20:05:33 +0000 [thread overview]
Message-ID: <20260416200533.90CE5C2BCB4@smtp.kernel.org> (raw)
In-Reply-To: <20260416-selftests-bpf_misconfig-v7-8-a078e18012e4@suse.com>
Sashiko AI review found 1 potential issue(s):
- [Medium] Moving TRUNNER_TEST_OBJS to order-only prerequisites in permissive mode breaks incremental builds for test binaries.
--
commit bb28ef3f04df5f17cc120a9836e147154e3974e2
Author: Ricardo B. Marlière <rbm@suse.com>
selftests/bpf: Allow test_progs to link with a partial object set
This commit modifies the Makefile to allow linking of the test runner binary
even when some test object files are missing due to compilation failures. It
moves the test objects to an order-only prerequisite list and uses a wildcard
filter when permissive mode is active.
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 5ad50d3ff2f8c..a5597e8431a0b 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
[ ... ]
> @@ -758,14 +758,15 @@ endif
> # some X.test.o files have runtime dependencies on Y.bpf.o files
> $(OUTPUT)/$(TRUNNER_BINARY): | $(TRUNNER_BPF_OBJS)
>
> -$(OUTPUT)/$(TRUNNER_BINARY): $(TRUNNER_TEST_OBJS) \
> +$(OUTPUT)/$(TRUNNER_BINARY): $(if $(PERMISSIVE),,$(TRUNNER_TEST_OBJS)) \
> $(TRUNNER_EXTRA_OBJS) $$(BPFOBJ) \
> $(TRUNNER_LIB_OBJS) \
> $(TRUNNER_BPFTOOL) \
> $(OUTPUT)/veristat \
> - | $(TRUNNER_BINARY)-extras
> + | $(TRUNNER_BINARY)-extras \
> + $(if $(PERMISSIVE),$(TRUNNER_TEST_OBJS))
Does moving TRUNNER_TEST_OBJS to the order-only prerequisites break
incremental builds when in permissive mode?
According to GNU Make semantics, order-only prerequisites enforce build
execution order but do not trigger a target rebuild if they are newer than
the target.
If a developer edits a test file, it looks like Make will recompile the
object file, but might consider the test runner binary up-to-date and not
relink it because the object is no longer a normal prerequisite.
Could this lead to developers silently running outdated test binaries after
modifying code?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260416-selftests-bpf_misconfig-v7-0-a078e18012e4@suse.com?part=8
next prev parent reply other threads:[~2026-04-16 20:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 19:30 [PATCH bpf-next v7 00/11] selftests/bpf: Tolerate partial builds across kernel configs Ricardo B. Marlière
2026-04-16 19:30 ` [PATCH bpf-next v7 01/11] selftests/bpf: Add BPF_STRICT_BUILD toggle Ricardo B. Marlière
2026-04-16 19:30 ` [PATCH bpf-next v7 02/11] selftests/bpf: Fix test_kmods KDIR to honor O= and distro kernels Ricardo B. Marlière
2026-04-16 19:52 ` sashiko-bot
2026-04-16 19:30 ` [PATCH bpf-next v7 03/11] selftests/bpf: Tolerate BPF and skeleton generation failures Ricardo B. Marlière
2026-04-16 19:30 ` [PATCH bpf-next v7 04/11] selftests/bpf: Avoid rebuilds when running emit_tests Ricardo B. Marlière
2026-04-16 19:30 ` [PATCH bpf-next v7 05/11] selftests/bpf: Make skeleton headers order-only prerequisites of .test.d Ricardo B. Marlière
2026-04-16 19:30 ` [PATCH bpf-next v7 06/11] selftests/bpf: Tolerate test file compilation failures Ricardo B. Marlière
2026-04-16 19:55 ` sashiko-bot
2026-04-16 19:30 ` [PATCH bpf-next v7 07/11] selftests/bpf: Skip tests whose objects were not built Ricardo B. Marlière
2026-04-16 19:30 ` [PATCH bpf-next v7 08/11] selftests/bpf: Allow test_progs to link with a partial object set Ricardo B. Marlière
2026-04-16 20:05 ` sashiko-bot [this message]
2026-04-16 19:30 ` [PATCH bpf-next v7 09/11] selftests/bpf: Tolerate benchmark build failures Ricardo B. Marlière
2026-04-16 19:30 ` [PATCH bpf-next v7 10/11] selftests/bpf: Provide weak definitions for cross-test functions Ricardo B. Marlière
2026-04-16 19:31 ` [PATCH bpf-next v7 11/11] selftests/bpf: Tolerate missing files during install Ricardo B. Marlière
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=20260416200533.90CE5C2BCB4@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=rbm@suse.com \
--cc=sashiko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox