From: Mike Rapoport <rppt@kernel.org>
To: Cao Ruichuang <create0818@163.com>
Cc: akpm@linux-foundation.org, david@kernel.org, shuah@kernel.org,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] selftests: mm: skip charge_reserved_hugetlb without killall
Date: Fri, 10 Apr 2026 08:30:03 +0300 [thread overview]
Message-ID: <adiK27fGKSZyl1Rf@kernel.org> (raw)
In-Reply-To: <20260410044139.67480-1-create0818@163.com>
On Fri, Apr 10, 2026 at 12:41:39PM +0800, Cao Ruichuang wrote:
> charge_reserved_hugetlb.sh tears down background writers with
> killall from psmisc. Minimal Ubuntu images do not always provide
> that tool, so the selftest fails in cleanup for an environment reason
> rather than for the hugetlb behavior it is trying to cover.
>
> Skip the test when killall is unavailable, similar to the existing
> root check, so these environments report the dependency clearly
> instead of failing the test.
>
> Signed-off-by: Cao Ruichuang <create0818@163.com>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> ---
> v2:
> - replace the PID tracking approach with a simple skip when killall is
> unavailable
> - follow Mike Rapoport's review suggestion
>
> tools/testing/selftests/mm/charge_reserved_hugetlb.sh | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh b/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
> index 44776965763..44f4e703deb 100755
> --- a/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
> +++ b/tools/testing/selftests/mm/charge_reserved_hugetlb.sh
> @@ -11,6 +11,11 @@ if [[ $(id -u) -ne 0 ]]; then
> exit $ksft_skip
> fi
>
> +if ! command -v killall >/dev/null 2>&1; then
> + echo "killall not available. Skipping..."
> + exit $ksft_skip
> +fi
> +
> nr_hugepgs=$(cat /proc/sys/vm/nr_hugepages)
>
> fault_limit_file=limit_in_bytes
> --
> 2.39.5 (Apple Git-154)
>
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2026-04-10 5:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260406053126.217196-1-create0818@163.com>
2026-04-10 4:41 ` Cao Ruichuang
2026-04-10 5:30 ` Mike Rapoport [this message]
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=adiK27fGKSZyl1Rf@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=create0818@163.com \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@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