From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: sun jian <sun.jian.kdev@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: run_vmtests.sh: fix relative path handling
Date: Fri, 9 Jan 2026 14:41:51 +0100 [thread overview]
Message-ID: <3cd08409-8c6b-42ab-97d5-e4440efe4f6a@kernel.org> (raw)
In-Reply-To: <CABFUUZGinC04zPEtwq3+maN-iNVNdc1p_BFnTdPNTsLXcQ1hnA@mail.gmail.com>
On 1/9/26 03:08, sun jian wrote:
>> hm, why? Is that a thing people actually do?
>>
>> Is anyone going to actually test this feature?
>
> Yes — invoking selftests directly from the kernel root can easily happen in
> practice, for example::
>
> sudo tools/testing/selftests/mm/run_vmtests.sh
>
> This currently results in false failures because relative paths being resolved
> against the caller's cwd instead of the script directory.
>>
>> Alternatively we could check that we're in the correct directory and
>> error out if not.
>
> That would also be reasonable, but I slightly prefer auto-cd because it
> avoids an easy invocation pitfall and makes the runner more robust for
> wrappers/CI
> where the cwd is not stable. That said, I'm happy to switch to a fail-fast cwd
> check if you prefer the behavior.
I'd prefer to just fail for the case that we never supported instead of
adding support for it.
--
Cheers
David
next prev parent reply other threads:[~2026-01-09 13:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 3:16 Sun Jian
2026-01-08 21:28 ` Andrew Morton
2026-01-09 2:08 ` sun jian
2026-01-09 13:41 ` David Hildenbrand (Red Hat) [this message]
2026-01-09 17:28 ` [PATCH v2] selftests/mm: run_vmtests.sh: fail if invoked from the wrong directory Sun Jian
2026-01-10 1:00 ` SeongJae Park
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=3cd08409-8c6b-42ab-97d5-e4440efe4f6a@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
--cc=sun.jian.kdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox