[LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems

Avinesh Kumar avinesh.kumar@suse.com
Fri Jul 3 12:44:24 CEST 2026


Hi,


On 7/3/26 3:57 AM, Wei Gao via ltp wrote:
> On newer kernels (v7.1-rc1+), vfat and exfat implement fileattr_get to
> support reporting casefolding. This causes the FS_IOC_GETFLAGS ioctl to
> return success, whereas on older kernels it returned ENOTTY.
> 
> Since FS_IOC_GETFLAGS succeeds, statx04 assumes standard writable inode
> attributes (append, immutable, nodump) are supported on these
> filesystems. However, they are not, causing the statx() attribute check
> to fail with TFAIL.
> 
> Fix this by checking if the filesystem type is vfat or exfat and skipping
> the test with TCONF.
> 
> This addresses the failures introduced by the following upstream Linux
> kernel commits:
> - 27e0b573dd4a ("exfat: Implement fileattr_get for case sensitivity")
> - c92db2ca72fe ("fat: Implement fileattr_get for case sensitivity")
> 
> Signed-off-by: Wei Gao <wegao@suse.com>
> ---
>   testcases/kernel/syscalls/statx/statx04.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/statx/statx04.c b/testcases/kernel/syscalls/statx/statx04.c
> index af30a200e..b2a2ac9cc 100644
> --- a/testcases/kernel/syscalls/statx/statx04.c
> +++ b/testcases/kernel/syscalls/statx/statx04.c
> @@ -91,6 +91,15 @@ static void setup(void)
>   	if (TST_RET)
>   		tst_brk(TBROK | TTERRNO, "Unexpected ioctl() error");
>   
> +	/*
> +	 * On newer kernels (v7.1-rc1+), vfat and exfat implement fileattr_get
> +	 * to support reporting casefolding, which causes FS_IOC_GETFLAGS to
> +	 * return success. However, they do not support standard writable inode
> +	 * attributes (append, immutable, nodump). Skip them.
> +	 */
> +	if (!strcmp(tst_device->fs_type, "vfat") || !strcmp(tst_device->fs_type, "exfat"))
> +		tst_brk(TCONF, "vfat and exfat do not support standard attributes");
> +
If we are skipping irrespective of kernel version, why not use 
'.skip_filesystems', that also avoids formatting and mounting.
We can also add these two kernel commits in the test documentation and 
maybe also in '.tags'.

>   	for (i = 0, expected_mask = 0; i < ARRAY_SIZE(attr_list); i++)
>   		expected_mask |= attr_list[i].attr;
>   

Regards,
Avinesh


More information about the ltp mailing list