[LTP] [PATCH v2 3/3] Setup minimal kernel for ioctl_clone(range) tests
Andrea Cervesato
andrea.cervesato@suse.de
Tue Oct 1 15:52:05 CEST 2024
From: Andrea Cervesato <andrea.cervesato@suse.com>
Some linux kernels don't support copy-on-write feature for the
filesystems we are going to use during ioctl_ficlone and
ioctl_ficlonerange tests. For this reason, fix the minimal kernel
version required in order to skip test when it's needed.
In particular:
- 4.16 removed experimental support for XFS reflink
- 6.7 added support for bcachefs
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
testcases/kernel/syscalls/ioctl/ioctl_ficlone01.c | 7 ++++++-
testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c | 7 ++++++-
testcases/kernel/syscalls/ioctl/ioctl_ficlonerange01.c | 7 ++++++-
testcases/kernel/syscalls/ioctl/ioctl_ficlonerange02.c | 7 ++++++-
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ficlone01.c b/testcases/kernel/syscalls/ioctl/ioctl_ficlone01.c
index f5407f789..2e2962872 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_ficlone01.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_ficlone01.c
@@ -112,10 +112,15 @@ static struct tst_test test = {
.mount_device = 1,
.mntpoint = MNTPOINT,
.filesystems = (struct tst_fs []) {
- {.type = "bcachefs"},
{.type = "btrfs"},
+ {
+ .type = "bcachefs",
+ .min_kver = "6.7",
+ },
{
.type = "xfs",
+ .min_kver = "4.16",
+ .mkfs_ver = "mkfs.xfs >= 1.5.0",
.mkfs_opts = (const char *const []) {"-m", "reflink=1", NULL},
},
{}
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c b/testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c
index 3cc386c59..fa99d634e 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_ficlone03.c
@@ -110,10 +110,15 @@ static struct tst_test test = {
.mount_device = 1,
.mntpoint = MNTPOINT,
.filesystems = (struct tst_fs []) {
- {.type = "bcachefs"},
{.type = "btrfs"},
+ {
+ .type = "bcachefs",
+ .min_kver = "6.7",
+ },
{
.type = "xfs",
+ .min_kver = "4.16",
+ .mkfs_ver = "mkfs.xfs >= 1.5.0",
.mkfs_opts = (const char *const []) {"-m", "reflink=1", NULL},
},
{}
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ficlonerange01.c b/testcases/kernel/syscalls/ioctl/ioctl_ficlonerange01.c
index e352c513b..800bf871d 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_ficlonerange01.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_ficlonerange01.c
@@ -145,10 +145,15 @@ static struct tst_test test = {
.mount_device = 1,
.mntpoint = MNTPOINT,
.filesystems = (struct tst_fs []) {
- {.type = "bcachefs"},
{.type = "btrfs"},
+ {
+ .type = "bcachefs",
+ .min_kver = "6.7",
+ },
{
.type = "xfs",
+ .min_kver = "4.16",
+ .mkfs_ver = "mkfs.xfs >= 1.5.0",
.mkfs_opts = (const char *const []) {"-m", "reflink=1", NULL},
},
{}
diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ficlonerange02.c b/testcases/kernel/syscalls/ioctl/ioctl_ficlonerange02.c
index ad36df162..6c76f83f7 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_ficlonerange02.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_ficlonerange02.c
@@ -82,10 +82,15 @@ static struct tst_test test = {
.mount_device = 1,
.mntpoint = MNTPOINT,
.filesystems = (struct tst_fs []) {
- {.type = "bcachefs"},
{.type = "btrfs"},
+ {
+ .type = "bcachefs",
+ .min_kver = "6.7",
+ },
{
.type = "xfs",
+ .min_kver = "4.16",
+ .mkfs_ver = "mkfs.xfs >= 1.5.0",
.mkfs_opts = (const char *const []) {"-m", "reflink=1", NULL},
},
{}
--
2.43.0
More information about the ltp
mailing list