Re: [PATCH] selftests/mm: ksm_tests: skip when not run as root
From: sun jian
Date: Sat Jan 10 2026 - 07:44:34 EST
On Sat, Jan 10, 2026 at 9:16 AM SeongJae Park <sj@xxxxxxxxxx> 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.
Regards,
Sun Jian