[LTP] [PATCH 3/3] stat04+lstat03: skip test on btrfs
Zorro Lang
zlang@kernel.org
Sun Dec 1 10:36:06 CET 2024
The "-b" option for mkfs.btrfs isn't a blocksize option, it does
"specify the size of each device as seen by the filesystem" for
btrfs. There's not an blocksize mkfs option for btrfs, so skip this
test.
Signed-off-by: Zorro Lang <zlang@kernel.org>
---
testcases/kernel/syscalls/lstat/lstat03.c | 2 ++
testcases/kernel/syscalls/stat/stat04.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/testcases/kernel/syscalls/lstat/lstat03.c b/testcases/kernel/syscalls/lstat/lstat03.c
index 675fb56f4..f7346893d 100644
--- a/testcases/kernel/syscalls/lstat/lstat03.c
+++ b/testcases/kernel/syscalls/lstat/lstat03.c
@@ -57,6 +57,8 @@ static void setup(void)
if (strcmp(tst_device->fs_type, "xfs") == 0)
snprintf(opt_bsize, sizeof(opt_bsize), "size=%i", pagesize);
+ else if (strcmp(tst_device->fs_type, "btrfs") == 0)
+ tst_brk(TCONF, "btrfs is not supported");
else
snprintf(opt_bsize, sizeof(opt_bsize), "%i", pagesize);
SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL);
diff --git a/testcases/kernel/syscalls/stat/stat04.c b/testcases/kernel/syscalls/stat/stat04.c
index 2a17cc7d7..3c4f1a6b4 100644
--- a/testcases/kernel/syscalls/stat/stat04.c
+++ b/testcases/kernel/syscalls/stat/stat04.c
@@ -59,6 +59,8 @@ static void setup(void)
if (strcmp(tst_device->fs_type, "xfs") == 0)
snprintf(opt_bsize, sizeof(opt_bsize), "size=%i", pagesize);
+ else if (strcmp(tst_device->fs_type, "btrfs") == 0)
+ tst_brk(TCONF, "btrfs is not supported");
else
snprintf(opt_bsize, sizeof(opt_bsize), "%i", pagesize);
SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL);
--
2.45.2
More information about the ltp
mailing list