On Mon, Mar 16, 2026 at 12:43:32PM +0800, Chunyu Hu wrote:
> The test_hugepage test contain two sub tests. If just reporting one skip
> when thp not available, there will be error in the log because the test
> count don't match the test plan. Change to skip two tests by running the
> ksft_test_result_skip twice in this case.

...
 
> Reviewed-by: Lorenzo Stoakes (Oracle) <[email protected]>
> Acked-by: David Hildenbrand (Arm) <[email protected]>
> Reviewed-by: Zi Yan <[email protected]>
> CC: Li Wang <[email protected]>
> Signed-off-by: Chunyu Hu <[email protected]>
> ---
> Changes in v2:
>   - add reviewed by from Lorenzo and Zi
>   - add acked-by from David
> ---
>  tools/testing/selftests/mm/soft-dirty.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/soft-dirty.c 
> b/tools/testing/selftests/mm/soft-dirty.c
> index 59c0dbe99a9b..bcfcac99b436 100644
> --- a/tools/testing/selftests/mm/soft-dirty.c
> +++ b/tools/testing/selftests/mm/soft-dirty.c
> @@ -82,7 +82,9 @@ static void test_hugepage(int pagemap_fd, int pagesize)
>       int i, ret;
>  
>       if (!thp_is_enabled()) {
> -             ksft_test_result_skip("Transparent Hugepages not available\n");
> +             ksft_print_msg("Transparent Hugepages not available\n");
> +             ksft_test_result_skip("Test %s huge page allocation\n", 
> __func__);
> +             ksft_test_result_skip("Test %s huge page dirty bit\n", 
> __func__);

There's already similar block when the page is not collapsed, but reworking
the test flow can be done on top as a separate commit.

Feel free to add

Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>

-- 
Sincerely yours,
Mike.

Reply via email to