[LTP] [PATCH v1] mmapstress06: TCONF on systems without swap space

Li Wang li.wang@linux.dev
Mon Apr 27 14:26:00 CEST 2026


Hi Wei,

Wei Gao via ltp wrote:

> mmapstress06 is designed to stress the mfile_swap kernel primitive, which
> manages shared anonymous memory. On architectures with large pages (like
> 64KB on ppc64le), the test's hardcoded request for 32769 pages results
> in a ~2GB mapping. So in suse test system configured with 2GB of RAM and
> no swap space, the test will fails with following information:
> 
> mmapstress06: errno = 12; large mmap failed
> for this test to run, it needs a mmap space of
> 32769 pages
> 
> The failure occurs because the 2GB request cannot be fulfilled within
> the 2GB RAM limit without swap backing. Since the test specifically
> intends to exercise swap-related logic (mfile_swap), it should be skipped
> with TCONF when the system lacks swap space.

Since we do have MAKE_SWAPFILE_SIZE macros, I guess we could create
a dedicated swap-file for the testing on those system?

And, it'd be appreciated if you can convert it into new LTP API.

-- 
Regards,
Li Wang


More information about the ltp mailing list