[LTP] [PATCH 1/1] swapon03: swapon() file on mounted filesystem

Li Wang liwang@redhat.com
Tue Feb 13 03:02:28 CET 2024


On Tue, Feb 13, 2024 at 3:26 AM Petr Vorel <pvorel@suse.cz> wrote:

> Change in 009a407a0 left the testing actually on TMPDIR (i.e. not on
> mounted filesystems), but it also failed on 6.7.0 openSUSE Tumbleweed
> kernel (it worked on 6.8.0-rc1):
>
>     # ./swapon03
>     tst_supported_fs_types.c:49: TINFO: mkfs is not needed for tmpfs
>     tst_test.c:1701: TINFO: === Testing on ext2 ===
>     tst_test.c:1117: TINFO: Formatting /dev/loop0 with ext2 opts='' extra
> opts=''
>     mke2fs 1.47.0 (5-Feb-2023)
>     tst_test.c:1131: TINFO: Mounting /dev/loop0 to
> /tmp/LTP_swaqXc3II/mntpoint fstyp=ext2 flags=0
>     tst_ioctl.c:26: TINFO: FIBMAP ioctl is supported
>     Failed to create swapfile: swapfile02
>     swapon03.c:181: TFAIL: Failed to setup swaps
>
> While at it, use snprintf() consistently and remove error handling (we
> newer use check for snprintf()), use TTERRNO.
>
> Fixes: 009a407a0 ("swapon/off: enable all_filesystem in swap test")
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>

Reviewed-by: Li Wang <liwang@redhat.com>


-- 
Regards,
Li Wang


More information about the ltp mailing list