From: Li Wang <liwang@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kbuild@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: tools/testing/selftests
Date: Tue, 31 Mar 2026 09:52:35 +0800 [thread overview]
Message-ID: <acso4-02tZhFBnKI@redhat.com> (raw)
In-Reply-To: <20260330170954.47dfef29063afe9ea502505a@linux-foundation.org>
On Mon, Mar 30, 2026 at 05:09:54PM -0700, Andrew Morton wrote:
> On Sun, 29 Mar 2026 18:04:52 +0800 Li Wang <liwang@redhat.com> wrote:
>
> > > ts:/usr/src/25> cat Makefile
> > > # Automatically generated by /usr/src/25/Makefile: don't edit
> > > export KBUILD_OUTPUT = .
> > > export KBUILD_EXTMOD = /usr/src/25
> > > export KBUILD_EXTMOD_OUTPUT = /usr/src/25
> > > include /usr/src/25/Makefile
> > >
> > > I've done this twice in succession now. Any suggestions where I should
> > > look?
> >
> > When build selftests from the top-level, sub-makes entered via `-C` may
> > still inherit the caller's PWD from the environment.
> >
> > Some selftests use $(PWD) in recursive kbuild invocations, which can
> > then incorrectly resolve to the kernel top directory instead of the
> > current test directory.
> >
> > Maybe try export PWD in the ../selftests/lib.mk?
> >
> > export PWD := $(CURDIR)
>
> Thanks, I'll get onto this stuff soon.
I have created a patchset for those build tiny issues,
let me send out to you to have a early try?
> Meanwhile, shouldn't this work?
>
> ts:/usr/src/25/tools/testing/selftests/mm> make merge.i
> make: *** No rule to make target 'merge.i'. Stop.
That's probably because Makefile explicitly disables the implicit .c to .i rule.
In line#43 of Makefile:
MAKEFLAGS += --no-builtin-rules
I doubt do we really need to add back the 'gcc -E' approach?
The selftests build system intentionally kills built-in rules to prevent
half-broken implicit builds.
(the comment line# 33~42 in the Makefile explains why)
--
Regards,
Li Wang
next prev parent reply other threads:[~2026-03-31 1:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 21:32 tools/testing/selftests Andrew Morton
2026-03-28 2:12 ` tools/testing/selftests Li Wang
2026-03-28 4:09 ` tools/testing/selftests Andrew Morton
2026-03-29 9:29 ` tools/testing/selftests Li Wang
[not found] ` <20260328135650.435b415f8c00835b2fa471e0@linux-foundation.org>
2026-03-28 21:03 ` tools/testing/selftests Andrew Morton
2026-03-29 10:04 ` tools/testing/selftests Li Wang
2026-03-31 0:09 ` tools/testing/selftests Andrew Morton
2026-03-31 1:52 ` Li Wang [this message]
2026-03-31 3:49 ` tools/testing/selftests Andrew Morton
2026-03-31 5:09 ` tools/testing/selftests Li Wang
2026-04-01 0:00 ` tools/testing/selftests Shuah Khan
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=acso4-02tZhFBnKI@redhat.com \
--to=liwang@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
/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