From: Andrew Morton <akpm@linux-foundation.org>
To: Li Wang <liwang@redhat.com>
Cc: linux-kbuild@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: tools/testing/selftests
Date: Mon, 30 Mar 2026 17:09:54 -0700 [thread overview]
Message-ID: <20260330170954.47dfef29063afe9ea502505a@linux-foundation.org> (raw)
In-Reply-To: <acj5RK3lze7o704Y@redhat.com>
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.
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.
next prev parent reply other threads:[~2026-03-31 0:09 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 ` Andrew Morton [this message]
2026-03-31 1:52 ` tools/testing/selftests Li Wang
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=20260330170954.47dfef29063afe9ea502505a@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liwang@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox