All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ricardo B. Marlière" <rbm@suse.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v6 05/11] selftests/bpf: Make skeleton headers order-only prerequisites of .test.d
Date: Sat, 25 Apr 2026 01:13:04 +0000	[thread overview]
Message-ID: <20260425011304.D5E38C2BCB2@smtp.kernel.org> (raw)
In-Reply-To: <20260416-selftests-bpf_misconfig-v6-5-7efeab504af1@suse.com>

Sashiko AI review found 1 potential issue(s):
- [Medium] The patch breaks incremental builds when a new BPF skeleton is added and included via a modified local header.
--

commit b493f7e4dc9746c484e30e391d53240eeb2b0fd3
Author: Ricardo B. Marlière <rbm@suse.com>

selftests/bpf: Make skeleton headers order-only prerequisites of .test.d

This commit makes BPF skeleton headers order-only prerequisites of .test.d
files. This is intended to prevent unnecessary recompilations and avoid build
errors when a skeleton is skipped.

> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 7d1e5d6c30ec..b3eaa4a93707 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -717,11 +717,11 @@ $(TRUNNER_TEST_OBJS): $(TRUNNER_OUTPUT)/%.test.o:			\
>  $(TRUNNER_TEST_OBJS:.o=.d): $(TRUNNER_OUTPUT)/%.test.d:			\
>  			    $(TRUNNER_TESTS_DIR)/%.c			\
>  			    $(TRUNNER_EXTRA_HDRS)			\
> +			    $$(BPFOBJ) | $(TRUNNER_OUTPUT)		\
>  			    $(TRUNNER_BPF_SKELS)			\
>  			    $(TRUNNER_BPF_LSKELS)			\
>  			    $(TRUNNER_BPF_LSKELS_SIGNED)		\
> -			    $(TRUNNER_BPF_SKELS_LINKED)			\
> -			    $$(BPFOBJ) | $(TRUNNER_OUTPUT)
> +			    $(TRUNNER_BPF_SKELS_LINKED)

Does this break incremental builds when a new skeleton is added and included
via an existing local header instead of modifying the .c file directly?

Because order-only prerequisites are only evaluated if the target itself needs
to be updated, and the .test.d file only depends on the .c file and
$(TRUNNER_EXTRA_HDRS), the .test.d file might be considered up-to-date.

If the .test.d is up-to-date, make ignores its order-only prerequisites, and
the new skeleton would never be generated.

When make proceeds to compile .test.o (which is marked out-of-date due to the
modified header), could it result in a "No such file or directory" error for
the new skeleton header?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260416-selftests-bpf_misconfig-v6-0-7efeab504af1@suse.com?part=5

  reply	other threads:[~2026-04-25  1:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 12:21 [PATCH bpf-next v6 00/11] selftests/bpf: Tolerate partial builds across kernel configs Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 01/11] selftests/bpf: Add BPF_STRICT_BUILD toggle Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 02/11] selftests/bpf: Fix test_kmods KDIR to honor O= and distro kernels Ricardo B. Marlière
2026-04-16 12:53   ` sashiko-bot
2026-04-26 23:40     ` Alexei Starovoitov
2026-04-27 21:23       ` Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 03/11] selftests/bpf: Tolerate BPF and skeleton generation failures Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 04/11] selftests/bpf: Avoid rebuilds when running emit_tests Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 05/11] selftests/bpf: Make skeleton headers order-only prerequisites of .test.d Ricardo B. Marlière
2026-04-25  1:13   ` sashiko-bot [this message]
2026-04-16 12:21 ` [PATCH bpf-next v6 06/11] selftests/bpf: Tolerate test file compilation failures Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 07/11] selftests/bpf: Skip tests whose objects were not built Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 08/11] selftests/bpf: Allow test_progs to link with a partial object set Ricardo B. Marlière
2026-04-16 13:03   ` bot+bpf-ci
2026-04-16 18:11   ` sashiko-bot
2026-04-16 12:21 ` [PATCH bpf-next v6 09/11] selftests/bpf: Tolerate benchmark build failures Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 10/11] selftests/bpf: Provide weak definitions for cross-test functions Ricardo B. Marlière
2026-04-16 12:21 ` [PATCH bpf-next v6 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=20260425011304.D5E38C2BCB2@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 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.