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

Wei Gao wegao@suse.com
Fri Jul 3 14:59:29 CEST 2026


On newer kernels (v7.2-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.

This addresses the failures introduced by the following upstream Linux
kernel commits:
- 27e0b573dd4a ("exfat: Implement fileattr_get for case sensitivity")
- c92db2ca726f ("fat: Implement fileattr_get for case sensitivity")

Signed-off-by: Wei Gao <wegao@suse.com>
---
 testcases/kernel/syscalls/statx/statx04.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/testcases/kernel/syscalls/statx/statx04.c b/testcases/kernel/syscalls/statx/statx04.c
index af30a200e..c029cd06e 100644
--- a/testcases/kernel/syscalls/statx/statx04.c
+++ b/testcases/kernel/syscalls/statx/statx04.c
@@ -47,6 +47,22 @@
  *
  *  mm/shmem: support FS_IOC_[SG]ETFLAGS in tmpfs
  *
+ * vfat and exfat are skipped because they do not support standard writable
+ * attributes (append, immutable, nodump) even though newer kernels support
+ * casefolding which causes FS_IOC_GETFLAGS to succeed since the following commits:
+ *
+ *  commit 27e0b573dd4aa927670fbfd84732e569fde72078
+ *  Author: Chuck Lever <cel@kernel.org>
+ *  Date:   Thu May 7 04:52:57 2026 -0400
+ *
+ *  exfat: Implement fileattr_get for case sensitivity
+ *
+ *  commit c92db2ca726fe61a66580d30ecff8c192a791935
+ *  Author: Chuck Lever <cel@kernel.org>
+ *  Date:   Thu May 7 04:52:56 2026 -0400
+ *
+ *  fat: Implement fileattr_get for case sensitivity
+ *
  */
 
 #define _GNU_SOURCE
@@ -133,6 +149,8 @@ static struct tst_test test = {
 	.skip_filesystems = (const char *const[]) {
 		"fuse",
 		"ntfs",
+		"vfat",
+		"exfat",
 		NULL
 	},
 	.tags = (const struct tst_tag[]) {
@@ -141,6 +159,8 @@ static struct tst_test test = {
 		{"linux-git", "04a87e347282"},
 		{"linux-git", "5f955f26f3d4"},
 		{"linux-git", "e408e695f5f1"},
+		{"linux-git", "27e0b573dd4a"},
+		{"linux-git", "c92db2ca726f"},
 		{}
 	},
 };
-- 
2.54.0



More information about the ltp mailing list