Re: [PATCH v4 6/7] selftests/mm: skip thuge-gen test if system is not setup properly

From: Wei Yang
Date: Sat Aug 16 2025 - 10:46:54 EST


On Sat, Aug 16, 2025 at 09:31:12AM +0530, Aboorva Devarajan wrote:
>Make thuge-gen skip instead of fail when it can't run due to system
>settings. If shmmax is too small or no 1G huge pages are available, the
>test now prints a warning and is marked as skipped.
>
>-------------------
>Before Patch:
>-------------------
>~ running ./thuge-gen
>~ Bail out! Please do echo 262144 > /proc/sys/kernel/shmmax
>~ Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0
>~ [FAIL]
>not ok 28 thuge-gen ~ exit=1
>
>-------------------
>After Patch:
>-------------------
>~ running ./thuge-gen
>~ ~ WARNING: shmmax is too small to run this test.
>~ ~ Please run the following command to increase shmmax:
>~ ~ echo 262144 > /proc/sys/kernel/shmmax
>~ 1..0 ~ SKIP Test skipped due to insufficient shmmax value.
>~ [SKIP]
>ok 29 thuge-gen ~ SKIP
>
>Co-developed-by: Donet Tom <donettom@xxxxxxxxxxxxx>
>Signed-off-by: Donet Tom <donettom@xxxxxxxxxxxxx>
>Reviewed-by: Dev Jain <dev.jain@xxxxxxx>
>Acked-by: David Hildenbrand <david@xxxxxxxxxx>
>Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
>Signed-off-by: Aboorva Devarajan <aboorvad@xxxxxxxxxxxxx>

Reviewed-by: Wei Yang <richard.weiyang@xxxxxxxxx>

--
Wei Yang
Help you, Help me