From: sashiko-bot@kernel.org
To: "Ziyang Men" <ziyang.meme@gmail.com>
Cc: sched-ext@lists.linux.dev, linux-input@vger.kernel.org,
tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com,
dmitry.torokhov@gmail.com, bpf@vger.kernel.org
Subject: Re: [PATCH v4 1/4] selftests: add shared lib.bpf.mk to build BPF progs and skeletons
Date: Wed, 09 Sep 2026 00:02:46 +0000 [thread overview]
Message-ID: <20260909000247.495EF1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908235552.2610256-2-ziyang.meme@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Order-only prerequisite on stamp file prevents rebuilding dependent objects when vmlinux.h changes.
--
commit f7b71013493f3d0a8611d16b18e727d7b737042f
Author: Ziyang Men <ziyang.meme@gmail.com>
selftests: add shared lib.bpf.mk to build BPF progs and skeletons
This patch adds a shared Makefile fragment (lib.bpf.mk) to standardize the
build tool-chain for BPF programs and skeletons across selftests. It
centralizes the build logic to reduce duplication as more subsystems adopt
BPF-based tests.
> diff --git a/tools/testing/selftests/lib.bpf.mk b/tools/testing/selftests/lib.bpf.mk
> new file mode 100644
> index 0000000000000..f27cd1889e7ff
> --- /dev/null
> +++ b/tools/testing/selftests/lib.bpf.mk
[ ... ]
> +# ---- build vmlinux.h ------------------------------------------------------
> +lib_bpf_vmlinux_h := $(INCLUDE_DIR)/vmlinux.h
> +lib_bpf_vmlinux_stamp := $(INCLUDE_DIR)/vmlinux.h.stamp
> +
> +# Preserve vmlinux.h's timestamp when its contents do not change.
> +ifeq ($(wildcard $(lib_bpf_vmlinux_h)),)
> +# Regenerate if the header is missing but its stamp remains.
> +.PHONY: $(lib_bpf_vmlinux_stamp)
> +endif
> +
> +# Use an order-only edge so the stamp's mtime does not propagate.
> +$(lib_bpf_vmlinux_h): | $(lib_bpf_vmlinux_stamp) ;
[Severity: Low]
Does using an order-only prerequisite here prevent rebuilding dependent
objects when vmlinux.h changes?
Using an order-only prerequisite means GNU Make might not re-stat
vmlinux.h after the stamp recipe updates it. To allow single-pass rebuilds
while avoiding redundant rebuilds when the contents haven't changed, would
it be better to use a normal dependency with the empty recipe `;`?
> +
> +$(lib_bpf_vmlinux_stamp): $(lib_bpf_vmlinux_deps) | $(INCLUDE_DIR)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908235552.2610256-1-ziyang.meme@gmail.com?part=1
next prev parent reply other threads:[~2026-09-09 0:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 23:55 [PATCH v4 0/4] selftests: add shared Makefile for BPF selftests and new memcg test Ziyang Men
2026-09-08 23:55 ` [PATCH v4 1/4] selftests: add shared lib.bpf.mk to build BPF progs and skeletons Ziyang Men
2026-09-09 0:02 ` sashiko-bot [this message]
2026-09-09 18:26 ` Tejun Heo
2026-09-08 23:55 ` [PATCH v4 2/4] selftests/cgroup: add memcg_stat_cross_cpu correctness test for flush Ziyang Men
2026-09-09 0:05 ` sashiko-bot
2026-09-08 23:55 ` [PATCH v4 3/4] selftests/hid: build the BPF program via the shared lib.bpf.mk Ziyang Men
2026-09-08 23:55 ` [PATCH v4 4/4] selftests/sched_ext: build BPF schedulers " Ziyang Men
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=20260909000247.495EF1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=linux-input@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=ziyang.meme@gmail.com \
/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.