Message ID | 20241201093606.68993-4-zlang@kernel.org |
---|---|
State | New |
Headers | show |
Series | LTP random fixes for xfs and btrfs | expand |
Hi! > 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"); This is overkill, all we need to skip on Btrfs is the st_blksize test. We need to set a flag in the test setup and then skip the corresponding TST_EXP_EXPR().
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);
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(+)