Re: [PATCH] selftests/mm: hugetlb_madv_vs_map: Avoid test skipping by querying hugepage size at runtime

From: David Hildenbrand
Date: Mon May 27 2024 - 09:40:57 EST




Am 09.05.24 um 11:54 schrieb Dev Jain:
Currently, the size used in mmap() is statically defined, leading to
skipping of the test on a hugepage size other than 2 MB, since munmap()
won't free the hugepage for a size greater than 2 MB. Hence, query the
size at runtime.

Also, there is no reason why a hugepage allocation should fail, since we
are using a simple mmap() using MAP_HUGETLB; hence, instead of skipping
the test, make it fail.
Signed-off-by: Dev Jain <dev.jain@xxxxxxx>
---


Likely it would make sense to rewrite that test to try with all available hugetlb sizes (like cow.c does).

Acked-by: David Hildenbrand <david@xxxxxxxxxx>


--
Thanks,

David / dhildenb