From: Wei Gao via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems
Date: Fri, 3 Jul 2026 01:57:24 +0000 [thread overview]
Message-ID: <20260703015745.20728-1-wegao@suse.com> (raw)
In-Reply-To: <20260701080324.19270-1-wegao@suse.com>
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");
+
for (i = 0, expected_mask = 0; i < ARRAY_SIZE(attr_list); i++)
expected_mask |= attr_list[i].attr;
--
2.54.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-07-03 1:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 8:03 [LTP] [PATCH v1] statx/statx04: Skip testing casefolded filesystems Wei Gao via ltp
2026-07-01 9:11 ` [LTP] " linuxtestproject.agent
2026-07-02 11:43 ` [LTP] [PATCH v1] " Andrea Cervesato via ltp
2026-07-02 11:48 ` Andrea Cervesato via ltp
2026-07-02 13:00 ` Wei Gao via ltp
2026-07-02 13:09 ` Andrea Cervesato via ltp
2026-07-03 1:57 ` Wei Gao via ltp [this message]
2026-07-03 2:56 ` [LTP] statx/statx04: Skip vfat and exfat filesystems linuxtestproject.agent
2026-07-03 10:44 ` [LTP] [PATCH v2] " Avinesh Kumar via ltp
2026-07-03 12:59 ` [LTP] [PATCH v3] " Wei Gao via ltp
2026-07-03 15:14 ` [LTP] " linuxtestproject.agent
2026-07-05 18:45 ` [LTP] [PATCH v3] " Avinesh Kumar via ltp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260703015745.20728-1-wegao@suse.com \
--to=ltp@lists.linux.it \
--cc=wegao@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox