Re: [PATCH v3 2/5] selftests/mm: skip guard hole-punch test if MADV_REMOVE is unsupported

From: David Hildenbrand (Arm)

Date: Thu Aug 13 2026 - 06:26:00 EST


On 7/27/26 11:52, Muhammad Usama Anjum wrote:
> The hole_punch case verifies that guard regions survive MADV_REMOVE and
> that the backing range is punched out. MADV_REMOVE delegates the hole
> punch to the backing filesystem, which may reject the operation with
> EOPNOTSUPP.
>
> That result means the test cannot establish the state whose guard
> semantics it intends to validate. Treating the missing filesystem
> capability as a guard-region failure creates a false regression.
>
> Unmap the range and skip only when MADV_REMOVE fails with EOPNOTSUPP.
> Preserve the assertion for all other errors so failures on supported
> configurations remain visible.
>
> Tested-by: Sarthak Sharma <sarthak.sharma@xxxxxxx>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@xxxxxxx>
> ---

Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David