[LTP] [PATCH v2] libswap.c: Improve calculate swap dev number

Petr Vorel pvorel@suse.cz
Wed Mar 6 10:59:20 CET 2024


Hi Xu,

> Hi Petr, all,


> > Hi Wei, all,

> > thanks, merged!

> > FYI swapon03 with this patch still fails on SLES 12-SP5 (4.12 based kernel):

> > tst_kconfig.c:87: TINFO: Parsing kernel config '/proc/config.gz'
> > tst_kconfig.c:87: TINFO: Parsing kernel config '/proc/config.gz'
> > swapon03.c:55: TFAIL: swapon(filename, 0) failed: EPERM (1)
> > swapon03.c:55: TFAIL: swapon(filename, 0) failed: EPERM (1)

> > But that's likely fails even without the patch (going to verify older SLES
> > releases).

> > Kind regards,
> > Petr

> I guess SLES 12-SP5 has backported some patch that modified kernel 
> constant MAX_SWAPFILES value[1]. But ltp doesn't add fallback for SLES 
> like I did for RHEL9.

Very good point, there are some patches.

> I think you can paste your kernel code(include/linux/swap.h), then you 
> or we can figure out what cause this failure.

I'll try to figure out what is missing and post the config (either with patches
or just config). Thanks!

> [1]https://github.com/linux-test-project/ltp/commit/c1b8c011e447088b08787462e0c2ed50cd8c43f3

> Best Regards
> Yang Xu


More information about the ltp mailing list