[LTP] [PATCH 3/3] stat04+lstat03: skip test on btrfs

Cyril Hrubis chrubis@suse.cz
Mon Dec 2 14:55:19 CET 2024


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().

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list