public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>, ltp@lists.linux.it
Subject: Re: [LTP] [Patch v6 7/8] swapon/off: enable all_filesystem in swap test
Date: Wed, 31 Jan 2024 19:53:10 +0100	[thread overview]
Message-ID: <20240131185310.GA30901@pevik> (raw)
In-Reply-To: <20240131173840.GA18869@pevik>

Hi Li,

First, I suppose you wait for Cyril, otherwise I would be for merging up to
previous commit ("libswap: customize swapfile size").

I found a problem in this commit. It looks like this patch breaks testing on
TMPDIR on tmpfs on Tumbleweed kernel 6.8.0-rc1-2.gf4ba5db-default:

TMPDIR=/tmp LTP_SINGLE_FS_TYPE=ntfs ./swapoff01
tst_test.c:1701: TINFO: === Testing on ntfs ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with ntfs opts='' extra opts=''
The partition start sector was not specified for /dev/loop0 and it could not be obtained automatically.  It has been set to 0.
The number of sectors per track was not specified for /dev/loop0 and it could not be obtained automatically.  It has been set to 0.
The number of heads was not specified for /dev/loop0 and it could not be obtained automatically.  It has been set to 0.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swawDOaMz/mntpoint fstyp=ntfs flags=0
tst_test.c:1131: TINFO: Trying FUSE...
tst_ioctl.c:26: TINFO: FIBMAP ioctl is supported
libswap.c:144: TBROK: Insufficient disk space to create swap file

df -hT /tmp/
Filesystem     Type   Size  Used Avail Use% Mounted on
tmpfs          tmpfs  717M     0  717M   0% /tmp

Test works on 6.6.x stable kernel, but that's due bigger tmpfs.
Could we at least TCONF (see below)?

I also wonder if we could make whole disk size a bit smaller.
The default 300 MB is not enough for XFS, right? But why 512 MB?
On6.8.0-rc1-2.gf4ba5db-default 350 MB is enough to test everything:

...
tst_test.c:1701: TINFO: === Testing on ntfs ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with ntfs opts='' extra opts=''
The partition start sector was not specified for /dev/loop0 and it could not be obtained automatically.  It has been set to 0.
The number of sectors per track was not specified for /dev/loop0 and it could not be obtained automatically.  It has been set to 0.
The number of heads was not specified for /dev/loop0 and it could not be obtained automatically.  It has been set to 0.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swaWEYzzv/mntpoint fstyp=ntfs flags=0
tst_test.c:1131: TINFO: Trying FUSE...
tst_ioctl.c:26: TINFO: FIBMAP ioctl is supported
swapoff01.c:39: TPASS: Succeeded to turn off swapfile
tst_test.c:1701: TINFO: === Testing on tmpfs ===
tst_test.c:1117: TINFO: Skipping mkfs for TMPFS filesystem
tst_test.c:1098: TINFO: Limiting tmpfs size to 512MB
tst_test.c:1131: TINFO: Mounting ltp-tmpfs to /tmp/LTP_swaWEYzzv/mntpoint fstyp=tmpfs flags=0
tst_ioctl.c:21: TINFO: FIBMAP ioctl is NOT supported: EINVAL (22)
libswap.c:198: TCONF: Swapfile on tmpfs not implemented

Summary:
passed   8
failed   0
broken   0
skipped  1
warnings 0

Kind regards,
Petr

diff --git a/testcases/kernel/syscalls/swapoff/swapoff01.c b/testcases/kernel/syscalls/swapoff/swapoff01.c
index af2a759cb..bde59df77 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff01.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff01.c
@@ -45,8 +45,7 @@ static void setup(void)
 	is_swap_supported(TEST_FILE);

 	if (!tst_fs_has_free(".", 64, TST_MB))
-		tst_brk(TBROK,
-			"Insufficient disk space to create swap file");
+		tst_brk(TCONF, "Insufficient disk space to create swap file");

 	if (make_swapfile(SWAP_FILE, 65536, 1))
 		tst_brk(TBROK, "Failed to create file for swap");

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-01-31 18:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 10:25 [LTP] [Patch v6 0/8] improvement work on libswap library Li Wang
2024-01-31 10:25 ` [LTP] [Patch v6 1/8] libswap: add known swap supported fs check Li Wang
2024-01-31 10:25 ` [LTP] [Patch v6 2/8] swapon01: Test on all filesystems Li Wang
2024-01-31 10:25 ` [LTP] [Patch v6 3/8] swapon01: Improving test with memory limits and swap reporting Li Wang
2024-01-31 10:25 ` [LTP] [Patch v6 4/8] libswap: add function to prealloc contiguous file Li Wang
2024-01-31 10:25 ` [LTP] [Patch v6 5/8] libswap: Introduce file contiguity check Li Wang
2024-01-31 10:25 ` [LTP] [Patch v6 6/8] libswap: customize swapfile size Li Wang
2024-01-31 18:01   ` Petr Vorel
2024-01-31 10:25 ` [LTP] [Patch v6 7/8] swapon/off: enable all_filesystem in swap test Li Wang
2024-01-31 17:38   ` Petr Vorel
2024-01-31 18:53     ` Petr Vorel [this message]
2024-01-31 19:01       ` Petr Vorel
2024-02-01  6:57         ` Li Wang
2024-02-01  7:46           ` Petr Vorel
2024-02-01  8:05             ` Li Wang
2024-02-01  4:00       ` Li Wang
2024-01-31 10:25 ` [LTP] [Patch v6 8/8] libswap: Refactor is_swap_supported function to return status Li Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240131185310.GA30901@pevik \
    --to=pvorel@suse.cz \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox