Re: [PATCH v2 4/5] selftests/mm: split_huge_page_test: skip the test when thp is not available

Mike Rapoport
2026-03-16T06:29:30Z

On Mon, Mar 16, 2026 at 12:43:34PM +0800, Chunyu Hu wrote:
> When thp is not enabled on some kernel config such as realtime kernel, the
> test will report failure. Fix the false positive by skipping the test
> directly when thp is not enabled.
>
> Tested with thp disabled kernel:
> Before The fix:
> # --------------------------------------------------
> # running ./split_huge_page_test /tmp/xfs_dir_Ywup9p
> # --------------------------------------------------
> # TAP version 13
> # Bail out! Reading PMD pagesize failed
> # # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0
> # [FAIL]
> not ok 61 split_huge_page_test /tmp/xfs_dir_Ywup9p # exit=1
>
> After the fix:
> # --------------------------------------------------
> # running ./split_huge_page_test /tmp/xfs_dir_YHPUPl
> # --------------------------------------------------
> # TAP version 13
> # 1..0 # SKIP Transparent Hugepages not available
> # [SKIP]
> ok 6 split_huge_page_test /tmp/xfs_dir_YHPUPl # SKIP
>
> Reviewed-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
> Reviewed-by: Zi Yan <ziy@nvidia.com>
> CC: Li Wang <liwang@redhat.com>
> Signed-off-by: Chunyu Hu <chuhu@redhat.com>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

--
Sincerely yours,
Mike.