Re: [PATCH RESEND] selftests/mm/run_vmtests.sh: skip hugevm tests if write_to_hugetlbfs is missing

Andrew Morton
2025-06-03T02:12:17Z

On Tue, 3 Jun 2025 02:22:32 +0300 Khaled Elnaggar <khaledelnaggarlinux@gmail.com> wrote:

> The hugevm tests 'charge_reserved_hugetlb.sh' and 'hugetlb_reparenting_test.sh'
> depend on the 'write_to_hugetlbfs' binary to simulate writes to hugetlbfs
> while checking reservations asynchronously in the background.
>
> When this binary is missing (e.g., excluded from the build), these tests hang
> for up to 180 seconds. During this time, run_vmtests.sh is eventually killed
> due to timeout, aborting all subsequent tests.
>
> This patch skips these tests if the binary is not found, preventing delays
> and ensuring that the test suite runs to completion.

OK, but why is write_to_hugetlbfs missing? If we're in a situation
where we _could_ run it then we _should_ run it! The user wants to
test stuff so we should test as much as we can.

So I'm thinking that it would be preferable to make sure the dang thing
is there?