[LTP] [PATCH 0/3] swapon03: Try to swapon() as many files until it fails

Petr Vorel pvorel@suse.cz
Wed Nov 5 16:47:13 CET 2025


Hi,

Previously tst_max_swapfiles() had fine tuning for a specific kernel
version which was fragile due various backports in enterprise kernels.

Let's try to create and use as many swap files until swapon() fails.
Then check for expected EPERM.

+ minor cleanup.

Petr Vorel (3):
  swapon03: Cleanup
  swapon03: Try to swapon() as many files until it fails
  libswap: Remove now unused tst_max_swapfiles()

 include/libswap.h                           |  7 --
 libs/swap/libswap.c                         | 64 ---------------
 testcases/kernel/syscalls/swapon/swapon03.c | 86 +++++++++++----------
 3 files changed, 47 insertions(+), 110 deletions(-)

-- 
2.51.0



More information about the ltp mailing list