Re: [PATCH 10/53] selftests/mm: hugetlb_madv_vs_map: use kselftest framework

From: Mike Rapoport

Date: Mon Apr 13 2026 - 06:34:42 EST


Hi,

On Thu, Apr 09, 2026 at 10:44:28PM +0530, Donet Tom wrote:
> Hi Mike
>
> On 4/6/26 7:46 PM, Mike Rapoport wrote:
>
> From: "Mike Rapoport (Microsoft)" <rppt@xxxxxxxxxx>
>
> Convert hugetlb_madv_vs_map test to use kselftest framework for
> reporting and tracking successful and failing runs.
>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> ---
> .../testing/selftests/mm/hugetlb_madv_vs_map.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> @@ -115,12 +114,13 @@ int main(void)
>
> if (ret) {
> ksft_test_result_fail("Unexpected huge page allocation\n");
> - return KSFT_FAIL;
> + ksft_finished();
>
>
> Should we call munmap() before exiting?

We could, not that it really matters.

> }
>
> /* Unmap and restart */
> munmap(huge_ptr, mmap_size);
> }
>
> - return KSFT_PASS;
> + ksft_test_result_pass("No unexpected huge page allocations\n");
> + ksft_finished();
> }
>

--
Sincerely yours,
Mike.