From: sashiko-bot@kernel.org
To: "Mykola Lysenko" <nickolay.lysenko@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [RFC PATCH bpf-next v5 6/8] selftests/bpf: extract BPF skeleton generation into a helper script
Date: Tue, 04 Aug 2026 17:59:47 +0000 [thread overview]
Message-ID: <20260804175948.3AFF11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260804170156.1709916-7-nickolay.lysenko@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch introduces a behavior change in permissive mode that results in noisy build logs and redundant error messages, contradicting the commit message claim that 'behavior is unchanged'. Additionally, a script comment references a non-existent file.
--
--- Patch [6]: [RFC PATCH bpf-next v5 6/8] selftests/bpf: extract BPF skeleton generation into a helper script ---
commit e4a593d3d0bfe3675d723364cb65f81a2812b866
Author: Mykola Lysenko <nickolay.lysenko@gmail.com>
selftests/bpf: extract BPF skeleton generation into a helper script
This commit extracts the BPF skeleton generation steps into a dedicated shell
script (gen_bpf_skel.sh) to reduce Makefile complexity and escaping issues. It
handles regular, light, signed light, and linked skeletons through script
flags.
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 0ee02eeac6bca..dbde2f6bd044d 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
[ ... ]
> -$(TRUNNER_BPF_SKELS): %.skel.h: %.bpf.o $(BPFTOOL) | $(TRUNNER_OUTPUT)
> - $(Q)$(if $(PERMISSIVE),if [ ! -f $$< ]; then \
> - $$(RM) $$@ $$(@:.skel.h=.subskel.h); \
> - printf ' %-12s %s\n' 'SKIP-SKEL' '$$(notdir $$@)' 1>&2; \
> - exit 0; \
> - fi;) \
> - printf ' %-12s %s\n' 'GEN-SKEL' '[$(TRUNNER_BINARY)] $$(notdir $$@)' 1>&2; \
> - $$(BPFTOOL) gen object $$(<:.o=.linked1.o) $$< && \
[ ... ]
> +$(TRUNNER_BPF_SKELS): %.skel.h: %.bpf.o $(BPFTOOL) gen_bpf_skel.sh | $(TRUNNER_OUTPUT)
> + $$(call msg,GEN-SKEL,$(TRUNNER_BINARY),$$@)
> + $(Q)BPFTOOL=$$(BPFTOOL) ./gen_bpf_skel.sh \
> + --name $$(notdir $$(<:.bpf.o=)) \
> + --skel $$@ --subskel $$(@:.skel.h=.subskel.h) $$< $$(call skip_on_fail,SKEL,$$(@:.skel.h=.subskel.h))
[Severity: Medium]
Does this change in permissive mode behavior contradict the commit message
which states "behavior is unchanged"?
Previously, if a .bpf.o file failed to compile in permissive mode, the
skeleton generation recipe would quietly check for the missing file, print
SKIP-SKEL, and exit early without executing bpftool.
With the missing-file guard removed, the recipe now unconditionally prints
GEN-SKEL and calls gen_bpf_skel.sh. This invokes bpftool on a missing file,
causing it to fail loudly to stderr before the skip_on_fail suffix catches
the exit code. This results in noisy build logs and redundant error messages.
> diff --git a/tools/testing/selftests/bpf/gen_bpf_skel.sh b/tools/testing/selftests/bpf/gen_bpf_skel.sh
> new file mode 100755
> index 0000000000000..e234f3a57d46b
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/gen_bpf_skel.sh
> @@ -0,0 +1,93 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
[ ... ]
> +# The bpftool binary is taken from $BPFTOOL (default: bpftool from PATH).
> +# On failure all outputs and intermediates are removed and the script
> +# exits non-zero; permissive-mode skipping is the caller's business
> +# (see skip_on_fail in Makefile.buildvars).
[Severity: Medium]
Is the reference to Makefile.buildvars correct here?
The file Makefile.buildvars does not exist. It looks like skip_on_fail is
actually defined directly in tools/testing/selftests/bpf/Makefile.
> +
> +set -u
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804170156.1709916-1-nickolay.lysenko@gmail.com?part=6
next prev parent reply other threads:[~2026-08-04 17:59 UTC|newest]
Thread overview: 23+ 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 [this message]
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
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=20260804175948.3AFF11F000E9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox