From: SeongJae Park <sj@kernel.org>
To: sun jian <sun.jian.kdev@gmail.com>
Cc: SeongJae Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/mm: ksm_tests: skip when not run as root
Date: Sat, 10 Jan 2026 09:00:10 -0800 [thread overview]
Message-ID: <20260110170013.88614-1-sj@kernel.org> (raw)
In-Reply-To: <CABFUUZE50X=PXAK0nFC1qhj4GhZ1FQJ2T2Jf8M0APE6s5-mgvA@mail.gmail.com>
On Sat, 10 Jan 2026 20:44:21 +0800 sun jian <sun.jian.kdev@gmail.com> wrote:
> On Sat, Jan 10, 2026 at 9:16 AM SeongJae Park <sj@kernel.org> wrote:
> > What about using ksft_exit_skip() instead, like compaction_test.c does?
> ksm_tests is a legacy selftest binary and doesn't use kselftest harness/TAP
> APIs. It only includes kselftest.h for the KSFT_* exit codes.
>
> This patch is a minimal prerequisite fix. Returning KSFT_SKIP already
> provides the correct semantic to the runner, without pulling ksm_tests into the
> harness model, which would be a larger refactor.
I agree such refactoring would be unnecessary for this small change. But you
can use ksft_exit_skip() without such refactoring, isn't it? The function is
declared in kselftest.h, not kselftest_harness.h. ksm_functional_tests.c is
also using ksft_exit_skip() without the harness model.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-01-10 17:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 9:43 Sun Jian
2026-01-10 1:16 ` SeongJae Park
2026-01-10 12:44 ` sun jian
2026-01-10 17:00 ` SeongJae Park [this message]
2026-01-11 0:37 ` Andrew Morton
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=20260110170013.88614-1-sj@kernel.org \
--to=sj@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