* [LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem
@ 2026-04-08 17:44 Matthew R. Ochs via ltp
2026-04-09 7:53 ` Petr Vorel
2026-04-09 8:27 ` Cyril Hrubis
0 siblings, 2 replies; 3+ messages in thread
From: Matthew R. Ochs via ltp @ 2026-04-08 17:44 UTC (permalink / raw)
To: ltp
LTP mounts ntfs via ntfs-3g (FUSE) rather than the kernel ntfs3
driver. ntfs-3g's ntfs_ioctl() returns EINVAL for any unhandled
ioctl, including FS_IOC_FSSETXATTR, so file_setattr() returns
EINVAL instead of the expected EOPNOTSUPP.
Add "ntfs" to skip_filesystems for the same reason "fuse" is
already skipped.
Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
---
testcases/kernel/syscalls/file_attr/file_attr05.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/file_attr/file_attr05.c b/testcases/kernel/syscalls/file_attr/file_attr05.c
index 6c1471da33e7..85b6cafc5f17 100644
--- a/testcases/kernel/syscalls/file_attr/file_attr05.c
+++ b/testcases/kernel/syscalls/file_attr/file_attr05.c
@@ -49,6 +49,7 @@ static struct tst_test test = {
.skip_filesystems = (const char *const []) {
"xfs",
"fuse", /* EINVAL is raised before EOPNOTSUPP */
+ "ntfs", /* mounted via ntfs-3g (FUSE), returns EINVAL */
"vfat", /* vfat is not implementing file_[set|get]attr */
NULL,
},
--
2.50.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem
2026-04-08 17:44 [LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem Matthew R. Ochs via ltp
@ 2026-04-09 7:53 ` Petr Vorel
2026-04-09 8:27 ` Cyril Hrubis
1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2026-04-09 7:53 UTC (permalink / raw)
To: Matthew R. Ochs; +Cc: ltp
Hi Matthew,
> LTP mounts ntfs via ntfs-3g (FUSE) rather than the kernel ntfs3
> driver. ntfs-3g's ntfs_ioctl() returns EINVAL for any unhandled
> ioctl, including FS_IOC_FSSETXATTR, so file_setattr() returns
> EINVAL instead of the expected EOPNOTSUPP.
> Add "ntfs" to skip_filesystems for the same reason "fuse" is
> already skipped.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Good catch, thanks!
We did not notice, because we have ntfs3 blacklisted in openSUSE Tumbleweed:
cat /etc/modprobe.d/60-blacklist_fs-ntfs3.conf
# The ntfs3 file system is blacklisted by default because it isn't actively
# supported by SUSE.
blacklist ntfs3
# The filesystem can be un-blacklisted by running "modprobe ntfs3".
# See README.md in the suse-module-tools package for details.
install ntfs3 /usr/lib/module-init-tools/unblacklist ntfs3; /sbin/modprobe --ignore-install ntfs3
Therefore it works:
# ./file_attr05
...
tst_supported_fs_types.c:98: TINFO: Kernel supports ext2
tst_supported_fs_types.c:63: TINFO: mkfs.ext2 does exist
tst_supported_fs_types.c:98: TINFO: Kernel supports ext3
tst_supported_fs_types.c:63: TINFO: mkfs.ext3 does exist
tst_supported_fs_types.c:98: TINFO: Kernel supports ext4
tst_supported_fs_types.c:63: TINFO: mkfs.ext4 does exist
tst_supported_fs_types.c:157: TINFO: Skipping xfs as requested by the test
tst_supported_fs_types.c:98: TINFO: Kernel supports btrfs
tst_supported_fs_types.c:63: TINFO: mkfs.btrfs does exist
tst_supported_fs_types.c:106: TINFO: Skipping bcachefs because of FUSE blacklist
tst_supported_fs_types.c:157: TINFO: Skipping vfat as requested by the test
tst_supported_fs_types.c:98: TINFO: Kernel supports exfat
tst_supported_fs_types.c:63: TINFO: mkfs.exfat does exist
tst_supported_fs_types.c:133: TINFO: FUSE does support ntfs
tst_supported_fs_types.c:63: TINFO: mkfs.ntfs does exist
tst_supported_fs_types.c:165: TINFO: Skipping FUSE based ntfs as requested by the test
...
But if I force ntfs, it really fails due using ntfs3:
# LTP_FORCE_SINGLE_FS_TYPE=ntfs ./file_attr05
...
tst_supported_fs_types.c:199: TINFO: WARNING: force testing only ntfs
tst_test.c:1997: TINFO: === Testing on ntfs ===
tst_test.c:1295: TINFO: Formatting /dev/loop0 with ntfs opts='' extra opts=''
The partition start sector was not specified for /dev/loop0 and it could not be obtained automatically. It has been set to 0.
The number of sectors per track was not specified for /dev/loop0 and it could not be obtained automatically. It has been set to 0.
The number of heads was not specified for /dev/loop0 and it could not be obtained automatically. It has been set to 0.
To boot from a device, Windows needs the 'partition start sector', the 'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
tst_test.c:1307: TINFO: Mounting /dev/loop0 to /tmp/LTP_filWegMd2/mntpoint fstyp=ntfs flags=0
tst_test.c:1307: TINFO: Trying FUSE...
file_attr05.c:23: TFAIL: file_setattr(AT_FDCWD, FILEPATH, attr_set, FILE_ATTR_SIZE_LATEST, 0) expected EOPNOTSUPP: EINVAL (22)
Other way is if I remove blacklist and manually run 'modprobe ntfs3'.
> Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
> ---
> testcases/kernel/syscalls/file_attr/file_attr05.c | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/testcases/kernel/syscalls/file_attr/file_attr05.c b/testcases/kernel/syscalls/file_attr/file_attr05.c
> index 6c1471da33e7..85b6cafc5f17 100644
> --- a/testcases/kernel/syscalls/file_attr/file_attr05.c
> +++ b/testcases/kernel/syscalls/file_attr/file_attr05.c
> @@ -49,6 +49,7 @@ static struct tst_test test = {
> .skip_filesystems = (const char *const []) {
> "xfs",
> "fuse", /* EINVAL is raised before EOPNOTSUPP */
> + "ntfs", /* mounted via ntfs-3g (FUSE), returns EINVAL */
For me it'd work to replace "fuse" with "ntfs" (i.e. remove "fuse").
Does it work for you as well, or you need to have blacklisted both?
> "vfat", /* vfat is not implementing file_[set|get]attr */
Also it looks to me that vfat is working.
Kind regards,
Petr
> NULL,
> },
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem
2026-04-08 17:44 [LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem Matthew R. Ochs via ltp
2026-04-09 7:53 ` Petr Vorel
@ 2026-04-09 8:27 ` Cyril Hrubis
1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2026-04-09 8:27 UTC (permalink / raw)
To: Matthew R. Ochs; +Cc: ltp
Hi!
> LTP mounts ntfs via ntfs-3g (FUSE) rather than the kernel ntfs3
> driver. ntfs-3g's ntfs_ioctl() returns EINVAL for any unhandled
> ioctl, including FS_IOC_FSSETXATTR, so file_setattr() returns
> EINVAL instead of the expected EOPNOTSUPP.
>
> Add "ntfs" to skip_filesystems for the same reason "fuse" is
> already skipped.
The "fuse" in skiplist should match all fuse based filesystems. We pass
the skip_filesystems pointer to tst_get_supported_fs_types() in
lib/tst_supported_fs_types.c. If "fuse" is present there we enable
skip_fuse flag nad pass it to fs_could_be_used() function. In the
fs_could_be_used() we check if filesystem is implemented by fuse and
then skip it accordingly.
When I run the test I see:
...
tst_supported_fs_types.c:165: TINFO: Skipping FUSE based ntfs as requested by the test
...
So likely something else is at play here. Are you sure you are dealing
with a fuse based ntfs or with the kernel based implementation?
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-09 8:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 17:44 [LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem Matthew R. Ochs via ltp
2026-04-09 7:53 ` Petr Vorel
2026-04-09 8:27 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox