[LTP] [PATCH] syscalls: file_attr05: skip ntfs filesystem

Matt Ochs mochs@nvidia.com
Fri Apr 10 00:51:20 CEST 2026


Hi Cyril, 

> On Apr 9, 2026, at 03:27, Cyril Hrubis <chrubis@suse.cz> wrote:
> 
> 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?
> 

On Ubuntu, ntfs3 is available as a kernel module, so                                                                                                                                                                                                                                             
has_kernel_support() in tst_supported_fs_types.c probes the kernel
mount, succeeds, and returns TST_FS_KERNEL immediately — never                                                                                                                                                                                                                                   
reaching the FUSE detection path. As a result, the existing "fuse"
skip doesn't fire even though safe_macros always mounts ntfs via
FUSE anyway.                                                                                                                                                                                                                                                                                     
   
I investigated fixing this in the library by consulting possibly_fuse()                                                                                                                                                                                                                          
in has_kernel_support() to fall through to FUSE detection when
safe_macros would use FUSE regardless. However, possibly_fuse() covers
both "ntfs" and "exfat", but safe_macros treats them differently —                                                                                                                                                                                                                               
ntfs always uses FUSE, while exfat tries the kernel driver first and
falls back to FUSE only on failure. The fix would incorrectly mark                                                                                                                                                                                                                               
exfat as FUSE-based on systems with kernel exfat support, causing                                                                                                                                                                                                                                
spurious skips in tests that skip "fuse".
                                                                                                                                                                                                                                                                                                   
Given that, I think the test-level fix is appropriate here. ntfs-3g                                                                                                                                                                                                                              
returns EINVAL for any unhandled ioctl, so skipping ntfs in file_attr05
is correct and consistent with how "fuse" is already handled in the                                                                                                                                                                                                                              
same skip list.


-matt


More information about the ltp mailing list