[LTP] [PATCH v3 6/7] syscalls/swapon03: Simply this case

Petr Vorel pvorel@suse.cz
Sat Feb 10 00:02:28 CET 2024


Hi Yang Xu,

> Hi Yang Xu,

> This fails on TMPDIR on btrfs on all tested filesystems:
s/btrfs/tmpfs/ (I'm sorry for a confusion)

> ...
> swapon03.c:61: TFAIL: swapon(filename, 0) failed: EPERM (1)
> swapon03.c:70: TINFO: Successfully created 23 swapfiles
> swapon03.c:138: TPASS: swapon(mntpoint/testswap, 0) : EPERM (1)

I'm sorry, I was wrong. The failure is on master, your patchset actually fix
this on TMPDIR tmpfs:

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_swaGbGeNL/mntpoint fstyp=ext2 flags=0
swapon03.c:147: TCONF: swap not supported on tmpfs
tst_test.c:1701: TINFO: === Testing on ext3 ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with ext3 opts='' extra opts=''
mke2fs 1.47.0 (5-Feb-2023)
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaGbGeNL/mntpoint fstyp=ext3 flags=0
swapon03.c:147: TCONF: swap not supported on tmpfs
tst_test.c:1701: TINFO: === Testing on ext4 ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
mke2fs 1.47.0 (5-Feb-2023)
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaGbGeNL/mntpoint fstyp=ext4 flags=0
swapon03.c:147: TCONF: swap not supported on tmpfs
tst_test.c:1701: TINFO: === Testing on xfs ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts=''
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaGbGeNL/mntpoint fstyp=xfs flags=0
swapon03.c:147: TCONF: swap not supported on tmpfs
tst_test.c:1701: TINFO: === Testing on btrfs ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with btrfs opts='' extra opts=''
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaGbGeNL/mntpoint fstyp=btrfs flags=0
swapon03.c:147: TCONF: swap not supported on tmpfs
tst_test.c:1701: TINFO: === Testing on bcachefs ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with bcachefs opts='' extra opts=''
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaGbGeNL/mntpoint fstyp=bcachefs flags=0
swapon03.c:147: TCONF: swap not supported on tmpfs
tst_test.c:1701: TINFO: === Testing on vfat ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with vfat opts='' extra opts=''
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaGbGeNL/mntpoint fstyp=vfat flags=0
swapon03.c:147: TCONF: swap not supported on tmpfs
tst_test.c:1701: TINFO: === Testing on exfat ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with exfat opts='' extra opts=''
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaGbGeNL/mntpoint fstyp=exfat flags=0
swapon03.c:147: TCONF: swap not supported on tmpfs

Although it's a bit suspicious that it always TCONF on tmpfs - this is a
regression on "syscalls/swapon03: use tst_max_swapfiles() and
GET_USED_SWAPFILES() api", but I'll discuss it there.

But now TMPFS on btrfs:
swapon03.c:61: TFAIL: swapon(filename, 0) failed: EPERM (1)

Current master on tmpfs fails:
./swapon03
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_swa0jhXpO/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

master on btrfs works.

Kind regards,
Petr

> ...
> Summary:
> passed   8
> failed   8
> broken   0
> skipped  2
> warnings 0

> Kind regards,
> Petr


More information about the ltp mailing list