[LTP] [PATCH v2] syscalls: add file_attr05 test

Petr Vorel pvorel@suse.cz
Tue Jan 20 10:59:45 CET 2026


Hi all,

> On Mon Jan 19, 2026 at 1:39 PM CET, Cyril Hrubis wrote:
> > Hi!
> > > +	.filesystems = (struct tst_fs []) {
> > > +		{.type = "vfat"},

> > I wonder if we can add more filesystems here, just to make sure that we
> > run the test even when vfat is not compiled in the kernel. Does ext2
> > implement the file_set/getattr calls?

> > > +		{}
> > > +	},

> > Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

> vfat and ntfs are the only ones which don't support both file_setattr()
> and file_getattr(), while ext family, tmpfs and btrfs don't raise
> EOPNOTSUPP for file_getattr() only.

Interesting, I would expect vfat/ntfs would not support both. (I suppose exfat
also does not support them).

> I'm wondering if that's a bug, since
> xfs is our reference for this implementation, or this has been
> introduced in 6.18-rc2 by 7ea30958b3054f5e488fa0b33c352723f7ab3a2a
> commit.

Maybe ask Andrey Albershteyn (the author) and Christian Brauner (the committer)?


> + * Regression test for "474b155adf39 - fs: make vfs_fileattr_[get|set] return
> + * -EOPNOTSUPP".

I also wonder if any of these should be mentioned in .tags (and in the text
comment, which I find a bit redundant when we have .tags):

474b155adf392 ("fs: make vfs_fileattr_[get|set] return -EOPNOTSUPP") # v6.17
NOTE: got reverted by 4dd5b5ac089bb in v6.18

d90ad28e8aa48 ("fs: return EOPNOTSUPP from file_setattr/file_getattr syscalls") # v6.18

Test itself LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list