* [LTP] [PATCH v1] statx/statx04: Skip testing casefolded filesystems
@ 2026-07-01 8:03 Wei Gao via ltp
2026-07-01 9:11 ` [LTP] " linuxtestproject.agent
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Wei Gao via ltp @ 2026-07-01 8:03 UTC (permalink / raw)
To: ltp
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 with FS_CASEFOLD_FL set, 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 retrieved flags contain FS_CASEFOLD_FL,
and if so, skip the test with TCONF. Additionally, define
FS_CASEFOLD_FL in include/lapi/fs.h for compatibility with older
user-space headers.
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>
---
include/lapi/fs.h | 4 ++++
testcases/kernel/syscalls/statx/statx04.c | 10 ++++++++++
2 files changed, 14 insertions(+)
diff --git a/include/lapi/fs.h b/include/lapi/fs.h
index 471ad0a25..0e2ed6e2d 100644
--- a/include/lapi/fs.h
+++ b/include/lapi/fs.h
@@ -69,6 +69,10 @@ struct fsxattr {
# define FS_VERITY_FL 0x00100000 /* Verity protected inode */
#endif
+#ifndef FS_CASEFOLD_FL
+# define FS_CASEFOLD_FL 0x40000000 /* Folder is case insensitive */
+#endif
+
#ifndef FS_XFLAG_APPEND
# define FS_XFLAG_APPEND 0x00000010 /* all writes append */
#endif
diff --git a/testcases/kernel/syscalls/statx/statx04.c b/testcases/kernel/syscalls/statx/statx04.c
index af30a200e..a4b663d2c 100644
--- a/testcases/kernel/syscalls/statx/statx04.c
+++ b/testcases/kernel/syscalls/statx/statx04.c
@@ -91,6 +91,16 @@ 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 with FS_CASEFOLD_FL. However, they do not support
+ * standard writable inode attributes (append, immutable, nodump).
+ * Check FS_CASEFOLD_FL to gracefully skip them.
+ */
+ if (i & FS_CASEFOLD_FL)
+ tst_brk(TCONF, "Casefolded directories/filesystems are not supported for this test");
+
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [LTP] statx/statx04: Skip testing casefolded filesystems
2026-07-01 8:03 [LTP] [PATCH v1] statx/statx04: Skip testing casefolded filesystems Wei Gao via ltp
@ 2026-07-01 9:11 ` linuxtestproject.agent
2026-07-02 11:43 ` [LTP] [PATCH v1] " Andrea Cervesato via ltp
2026-07-03 1:57 ` [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems Wei Gao via ltp
2 siblings, 0 replies; 12+ messages in thread
From: linuxtestproject.agent @ 2026-07-01 9:11 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi Wei,
On Wed, Jul 01, 2026, Wei Gao wrote:
> statx/statx04: Skip testing casefolded filesystems
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [LTP] [PATCH v1] statx/statx04: Skip testing casefolded filesystems
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 ` Andrea Cervesato via ltp
2026-07-02 11:48 ` Andrea Cervesato via ltp
2026-07-03 1:57 ` [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems Wei Gao via ltp
2 siblings, 1 reply; 12+ messages in thread
From: Andrea Cervesato via ltp @ 2026-07-02 11:43 UTC (permalink / raw)
To: Wei Gao via ltp; +Cc: ltp
Hi Wei,
this patch is not correct. We need to filter out via `expected_marks`
the unsupported inode attributes only for exfat and vfat, not blindly
TBROK when casefolder attributes are supported.
if (!strcmp(tst_device->fs_type, "vfat") || !strcmp(tst_device->fs_type, "exfat"))
expected_mask &= ~(STATX_ATTR_APPEND | STATX_ATTR_IMMUTABLE | STATX_ATTR_NODUMP);
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [LTP] [PATCH v1] statx/statx04: Skip testing casefolded filesystems
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
0 siblings, 1 reply; 12+ messages in thread
From: Andrea Cervesato via ltp @ 2026-07-02 11:48 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: Wei Gao via ltp
> if (!strcmp(tst_device->fs_type, "vfat") || !strcmp(tst_device->fs_type, "exfat"))
> expected_mask &= ~(STATX_ATTR_APPEND | STATX_ATTR_IMMUTABLE | STATX_ATTR_NODUMP);
One more thing: this is a snippet. Remember that we also need to filter
out the right kernel version, which is the v7.1 at this point, since it
has been released.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [LTP] [PATCH v1] statx/statx04: Skip testing casefolded filesystems
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
0 siblings, 1 reply; 12+ messages in thread
From: Wei Gao via ltp @ 2026-07-02 13:00 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: Wei Gao via ltp
O
Thu, Jul 02, 2026 at 11:48:47AM +0000, Andrea Cervesato via ltp wrote:
> > if (!strcmp(tst_device->fs_type, "vfat") || !strcmp(tst_device->fs_type, "exfat"))
> > expected_mask &= ~(STATX_ATTR_APPEND | STATX_ATTR_IMMUTABLE | STATX_ATTR_NODUMP);
I guess we also need exclude STATX_ATTR_COMPRESSED?
expected_mask &= ~(STATX_ATTR_APPEND | STATX_ATTR_IMMUTABLE | STATX_ATTR_NODUMP | STATX_ATTR_COMPRESSED);
But when we do this, meaning the test runs but verifies nothing, just
TCONF is more clean.
>
> One more thing: this is a snippet. Remember that we also need to filter
> out the right kernel version, which is the v7.1 at this point, since it
> has been released.
Adding a kernel version check with tst_kvercmp(7, 1, 0) is redundant here. Here is why:
On kernels < v7.1:
vfat/exfat do not support FS_IOC_GETFLAGS at all. The ioctl() call fails with ENOTTY, and the test is immediately skipped with TCONF at the beginning of setup():
if (TST_RET == -1 && TST_ERR == ENOTTY)
tst_brk(TCONF | TTERRNO, "Inode attributes not supported");
So i suggest we just give fix like following, do you agree?
if (!strcmp(tst_device->fs_type, "vfat") || !strcmp(tst_device->fs_type, "exfat"))
tst_brk(TCONF, "vfat and exfat filesystems do not support standard attributes");
>
> --
> Andrea Cervesato
> SUSE QE Automation Engineer Linux
> andrea.cervesato@suse.com
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [LTP] [PATCH v1] statx/statx04: Skip testing casefolded filesystems
2026-07-02 13:00 ` Wei Gao via ltp
@ 2026-07-02 13:09 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 12+ messages in thread
From: Andrea Cervesato via ltp @ 2026-07-02 13:09 UTC (permalink / raw)
To: Wei Gao; +Cc: Wei Gao via ltp
> So i suggest we just give fix like following, do you agree?
> if (!strcmp(tst_device->fs_type, "vfat") || !strcmp(tst_device->fs_type, "exfat"))
> tst_brk(TCONF, "vfat and exfat filesystems do not support standard attributes");
yes you are right, let's just skip this test for those two FS
in this case.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems
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-03 1:57 ` Wei Gao via ltp
2026-07-03 2:56 ` [LTP] " linuxtestproject.agent
` (2 more replies)
2 siblings, 3 replies; 12+ messages in thread
From: Wei Gao via ltp @ 2026-07-03 1:57 UTC (permalink / raw)
To: ltp
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [LTP] statx/statx04: Skip vfat and exfat filesystems
2026-07-03 1:57 ` [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems Wei Gao via ltp
@ 2026-07-03 2:56 ` 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
2 siblings, 0 replies; 12+ messages in thread
From: linuxtestproject.agent @ 2026-07-03 2:56 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi Wei,
On Fri, Jul 3 2026, Wei Gao wrote:
> statx/statx04: Skip vfat and exfat filesystems
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems
2026-07-03 1:57 ` [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems Wei Gao via ltp
2026-07-03 2:56 ` [LTP] " linuxtestproject.agent
@ 2026-07-03 10:44 ` Avinesh Kumar via ltp
2026-07-03 12:59 ` [LTP] [PATCH v3] " Wei Gao via ltp
2 siblings, 0 replies; 12+ messages in thread
From: Avinesh Kumar via ltp @ 2026-07-03 10:44 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* [LTP] [PATCH v3] statx/statx04: Skip vfat and exfat filesystems
2026-07-03 1:57 ` [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems Wei Gao via ltp
2026-07-03 2:56 ` [LTP] " linuxtestproject.agent
2026-07-03 10:44 ` [LTP] [PATCH v2] " Avinesh Kumar via ltp
@ 2026-07-03 12:59 ` Wei Gao via ltp
2026-07-03 15:14 ` [LTP] " linuxtestproject.agent
2026-07-05 18:45 ` [LTP] [PATCH v3] " Avinesh Kumar via ltp
2 siblings, 2 replies; 12+ messages in thread
From: Wei Gao via ltp @ 2026-07-03 12:59 UTC (permalink / raw)
To: ltp
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [LTP] statx/statx04: Skip vfat and exfat filesystems
2026-07-03 12:59 ` [LTP] [PATCH v3] " Wei Gao via ltp
@ 2026-07-03 15:14 ` linuxtestproject.agent
2026-07-05 18:45 ` [LTP] [PATCH v3] " Avinesh Kumar via ltp
1 sibling, 0 replies; 12+ messages in thread
From: linuxtestproject.agent @ 2026-07-03 15:14 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi Wei,
On Fri, 3 Jul 2026 12:59:29 +0000, Wei Gao wrote:
> statx/statx04: Skip vfat and exfat filesystems
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [LTP] [PATCH v3] statx/statx04: Skip vfat and exfat filesystems
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 ` Avinesh Kumar via ltp
1 sibling, 0 replies; 12+ messages in thread
From: Avinesh Kumar via ltp @ 2026-07-05 18:45 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi,
Reviewed-by: Avinesh Kumar <avinesh.kumar@suse.com>
Regards,
Avinesh
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-07-05 18:45 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [LTP] [PATCH v2] statx/statx04: Skip vfat and exfat filesystems Wei Gao via ltp
2026-07-03 2:56 ` [LTP] " 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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.