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

Yang Xu (Fujitsu) xuyang2018.jy@fujitsu.com
Wed Mar 6 02:32:15 CET 2024


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.

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

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

Best Regards
Yang Xu


More information about the ltp mailing list