From: "Ricardo B. Marlière" <rbm@suse.com>
To: sashiko@lists.linux.dev, "Ricardo B. Marlière" <rbm@suse.com>
Cc: <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v11 09/11] selftests/bpf: Tolerate benchmark build failures
Date: Mon, 04 May 2026 11:04:48 -0300 [thread overview]
Message-ID: <DI9Y6R84C029.16EELKNHG5NEL@suse.com> (raw)
In-Reply-To: <20260430163852.E33CCC2BCB3@smtp.kernel.org>
On Thu Apr 30, 2026 at 1:38 PM -03, sashiko-bot wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Skipping the 'bench' binary compilation will cause 'make install' to abort.
> --
>
> commit 17b45ab67f584992f6ac2a400e83d514968d8c98
> Author: Ricardo B. Marlière <rbm@suse.com>
>
> selftests/bpf: Tolerate benchmark build failures
>
> This commit allows benchmark object compilation and final bench linking to
> be non-fatal when PERMISSIVE is set. It emits a skip message and removes
> the failed outputs so stale binaries are not reused by incremental builds.
>
>> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
>> index 04634e6e0661e..a460f2ad3cffa 100644
>> --- a/tools/testing/selftests/bpf/Makefile
>> +++ b/tools/testing/selftests/bpf/Makefile
>
> [ ... ]
>
>> @@ -988,7 +989,8 @@ $(OUTPUT)/bench: $(OUTPUT)/bench.o \
>> $(OUTPUT)/usdt_2.o \
>> #
>> $(call msg,BINARY,,$@)
>> - $(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(filter %.a %.o,$^) $(LDLIBS) -o $@
>> + $(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(filter %.a %.o,$^) $(LDLIBS) -o $@ $(if $(PERMISSIVE),|| \
>> + ($(RM) $@; printf ' %-12s %s\n' 'SKIP-LINK' '$(notdir $@) (some benchmarks may have been skipped)' 1>&2))
>
> Will removing the target via $(RM) $@ here cause make install to abort?
This is a non issue for the default BPF_STRICT_BUILD=1 case.
>
> The bench binary is registered in the TEST_GEN_PROGS_EXTENDED variable in the
> BPF Makefile. The selftests framework (via tools/testing/selftests/lib.mk)
> unconditionally attempts to install all files in this list using rsync.
>
> Because lib.mk does not use the --ignore-missing-args flag for this target,
> rsync will fail to find the bench binary if it was skipped (and thus
> removed) during a permissive build. This non-zero exit status from rsync
> would break the make install step.
>
> I note this is addressed later in the series by commit 99f5f021f0516
> (selftests/bpf: Tolerate missing files during install).
Yes.
parent reply other threads:[~2026-05-04 14:04 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260430163852.E33CCC2BCB3@smtp.kernel.org>]
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=DI9Y6R84C029.16EELKNHG5NEL@suse.com \
--to=rbm@suse.com \
--cc=bpf@vger.kernel.org \
--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