Re: [RESEND PATCH 1/4] selftests/mm/guard-regions: skip collapse test when thp not enabled
From: Zi Yan
Date: Thu Mar 12 2026 - 09:59:07 EST
On 12 Mar 2026, at 7:40, Chunyu Hu wrote:
> When thp is not available, just skip the collape tests to avoid the false
> positive.
>
> Without the change, run with a thp disabled kernel:
> ./run_vmtests.sh -t madv_guard
> <snip/>
> # # RUN guard_regions.file.multi_vma ...
> # # OK guard_regions.file.multi_vma
> # ok 89 guard_regions.file.multi_vma
> # # RUN guard_regions.file.basic ...
> # # OK guard_regions.file.basic
> # ok 90 guard_regions.file.basic
> # # FAILED: 87 / 90 tests passed.
> # # 17 skipped test(s) detected. Consider enabling relevant config options to improve coverage.
> # # Totals: pass:70 fail:3 xfail:0 xpass:0 skip:17 error:0
> # [FAIL]
> not ok 1 guard-regions # exit=1
> hwpoison_inject
> # SUMMARY: PASS=0 SKIP=0 FAIL=1
>
> With this change, run with thp disabled kernel:
> ./run_vmtests.sh -t madv_guard
> <snip/>
> # ok 90 guard_regions.file.basic
> # # PASSED: 90 / 90 tests passed.
> # # 20 skipped test(s) detected. Consider enabling relevant config options to improve coverage.
> # # Totals: pass:70 fail:0 xfail:0 xpass:0 skip:20 error:0
> # [PASS]
> ok 1 guard-regions
> hwpoison_inject
> # SUMMARY: PASS=1 SKIP=0 FAIL=0
> 1..1
> CC: Li Wang <liwang@xxxxxxxxxx>
> Signed-off-by: Chunyu Hu <chuhu@xxxxxxxxxx>
> ---
> tools/testing/selftests/mm/guard-regions.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
LGTM.
Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
Best Regards,
Yan, Zi