All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Petr Vorel" <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] syscalls: add file_attr05 test
Date: Tue, 20 Jan 2026 11:43:35 +0100	[thread overview]
Message-ID: <DFTCS1EEBMDD.21X779ISM0MTF@suse.com> (raw)
In-Reply-To: <20260120095945.GA27808@pevik>

On Tue Jan 20, 2026 at 10:59 AM CET, Petr Vorel wrote:
> 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

I re-checked the code and it's a correct behaviour. The reason is that
every file_setattr() call using FSX feature will cause a EOPNOTSUPP for
filesystems not support it.

file_getattr() syscall is different, because it fetches data from a
filesystem without setting anything to it.

About vfat, `struct inode_operations` in the vfat implementation is not
defining .fileattr_get and .fileattr_set attributes, so we have a
reason for having a EOPNOTSUPP.

I think my approach is wrong, because the test is not really
verifying if FSX features are tested or not, but verifying that vfat is
not implementing file_setattr/file_getattr. Hence I will change this
test, verifying file_setattr() syscall only, including all filesystems
and checking that XFS features are triggering EOPNOTSUPP, except for
XFS.

I will send a v3.

Thanks,
-- 
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-01-20 10:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14  7:58 [LTP] [PATCH v2] syscalls: add file_attr05 test Andrea Cervesato
2026-01-16 11:20 ` Li Wang via ltp
2026-01-19 12:39 ` Cyril Hrubis
2026-01-19 14:03   ` Andrea Cervesato via ltp
2026-01-20  9:59     ` Petr Vorel
2026-01-20 10:43       ` Andrea Cervesato via ltp [this message]
2026-01-20 10:55         ` Andrea Cervesato 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=DFTCS1EEBMDD.21X779ISM0MTF@suse.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=pvorel@suse.cz \
    /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 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.