From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] swapon01: Test on all filesystems
Date: Sat, 20 Jan 2024 12:34:12 +0800 [thread overview]
Message-ID: <20240120043412.2544860-2-liwang@redhat.com> (raw)
In-Reply-To: <20240120043412.2544860-1-liwang@redhat.com>
From: Petr Vorel <pvorel@suse.cz>
Test on all filesystems to increase coverage.
Skip filesystems which does not support swap (currently bcachefs, btrfs
and tmpfs).
Tested on 5.10, 6.6 and 6.7.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/kernel/syscalls/swapon/swapon01.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/swapon/swapon01.c b/testcases/kernel/syscalls/swapon/swapon01.c
index e59fb20a1..e1fe50459 100644
--- a/testcases/kernel/syscalls/swapon/swapon01.c
+++ b/testcases/kernel/syscalls/swapon/swapon01.c
@@ -8,6 +8,7 @@
* [Description]
*
* Checks that swapon() succeds with swapfile.
+ * Testing on all filesystems which support swap file.
*/
#include <unistd.h>
@@ -17,7 +18,8 @@
#include "lapi/syscalls.h"
#include "libswap.h"
-#define SWAP_FILE "swapfile01"
+#define MNTPOINT "mntpoint"
+#define SWAP_FILE MNTPOINT"/swapfile01"
static void verify_swapon(void)
{
@@ -36,8 +38,10 @@ static void setup(void)
}
static struct tst_test test = {
+ .mntpoint = MNTPOINT,
+ .mount_device = 1,
.needs_root = 1,
- .needs_tmpdir = 1,
+ .all_filesystems = 1,
.test_all = verify_swapon,
.setup = setup
};
--
2.40.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-01-20 4:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 14:43 [LTP] [PATCH 1/1] swapon01: Test on all filesystems Petr Vorel
2024-01-19 15:06 ` Cyril Hrubis
2024-01-22 6:22 ` Petr Vorel
2024-01-22 7:39 ` Li Wang
2024-01-20 4:21 ` Li Wang
2024-01-20 4:34 ` [LTP] [PATCH 1/2] libswap: add known swap supported fs check Li Wang
2024-01-20 4:34 ` Li Wang [this message]
2024-01-20 6:40 ` [LTP] [PATCH] swapon01: Improving test with memory limits and swap reporting Li Wang
2024-01-20 6:52 ` Li Wang
2024-01-20 8:27 ` [LTP] [PATCH] libswap: add Btrfs noCOW attribute setting for swap files Li Wang
2024-01-22 7:13 ` Petr Vorel
2024-01-22 7:28 ` Li Wang
2024-01-22 6:26 ` [LTP] [PATCH 1/1] swapon01: Test on all filesystems Petr Vorel
2024-01-22 7:50 ` Li Wang
2024-01-22 8:24 ` Petr Vorel
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=20240120043412.2544860-2-liwang@redhat.com \
--to=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