Re: [PATCH v3 3/5] selftests/mm: skip khugepaged swap tests without swap
From: David Hildenbrand (Arm)
Date: Thu Aug 13 2026 - 06:27:06 EST
On 7/27/26 11:52, Muhammad Usama Anjum wrote:
> collapse_swapin_single_pte and collapse_max_ptes_swap require
> MADV_PAGEOUT to replace anonymous pages with swap entries. On swapless
> systems there is no backing store with which to create those entries,
> so check_swap() reports missing setup rather than broken khugepaged
> behavior.
>
> Swapless configurations are common on Android and other constrained
> test devices. Failing these cases obscures actionable results from the
> rest of the khugepaged suite.
>
> Check /proc/swaps before either swap-dependent case and skip when no
> active swap area exists. With swap present, retain the existing
> MADV_PAGEOUT and swap-entry assertions unchanged.
>
> Print each existing swapout diagnostic before the prerequisite check
> so skip() completes a KTAP diagnostic line instead of emitting an
> unprefixed message.
>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@xxxxxxx>
> ---
Didn't I reject a similar patch recently? :)
Ah, yes, actually two similar ones:
https://lore.kernel.org/all/9d0d98ea-05bd-43c0-bb36-68aea62cbde8@xxxxxxxxxx/
https://lore.kernel.org/all/20260715133418.170386-1-jaeyeon.lee.dev@xxxxxxxxx/
And I think what Kiryl proposes is actually the right thing to do:
https://lore.kernel.org/all/20260812132304.199287-6-kirill@xxxxxxxxxxxxx/
So let's drop this patch.
--
Cheers,
David