[LTP] [PATCH] file_attr02: Add XFS kernel config requirement
    Petr Vorel 
    pvorel@suse.cz
       
    Fri Oct 24 15:30:35 CEST 2025
    
    
  
> The file_attr02 test requires XFS filesystem support to properly
> test the FS_IOC_FSSETXATTR ioctl with project quotas. Add the
> XFS kernel configuration requirement to ensure the test can run
> on systems with XFS support either built-in or as a module.
So you have problem on the kernel with CONFIG_XFS_FS=y?
I wonder why tst_get_supported_fs_types() from lib/tst_supported_fs_types.c did
not detect it. Could you please post whole output?
Because if code in struct tst_test.filesystems does not work, many tests would
be affected with this setup. I'm probably missing something, but I'd prefer to
fix the detection in the library than force config (we don't have any CONFIG_.*_FS
in testcases/).
> Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  testcases/kernel/syscalls/file_attr/file_attr02.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> diff --git a/testcases/kernel/syscalls/file_attr/file_attr02.c b/testcases/kernel/syscalls/file_attr/file_attr02.c
> index f6625985a514..0ad57177078b 100644
> --- a/testcases/kernel/syscalls/file_attr/file_attr02.c
> +++ b/testcases/kernel/syscalls/file_attr/file_attr02.c
> @@ -18,6 +18,11 @@
>  #define BLOCKS 128
>  #define PROJID 16
> +static const char *kconfigs[] = {
> +	"CONFIG_XFS_FS=y | CONFIG_XFS_FS=m",
> +	NULL
> +};
> +
>  static int fd = -1;
>  static int dfd = -1;
>  static struct fsxattr xattr;
> @@ -105,5 +110,6 @@ static struct tst_test test = {
>  	.bufs = (struct tst_buffers []) {
>  		{&attr, .size = sizeof(struct file_attr)},
>  		{}
> -	}
> +	},
> +	.needs_kconfigs = kconfigs,
very nit: we usually use anonymous definition here, instead creating static
variable kconfigs[].
Kind regards,
Petr
>  };
    
    
More information about the ltp
mailing list