* [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs
@ 2026-08-07 10:44 Wake Liu via ltp
2026-08-07 11:04 ` [LTP] " linuxtestproject.agent
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Wake Liu via ltp @ 2026-08-07 10:44 UTC (permalink / raw)
To: ltp; +Cc: Wake Liu
The test was expecting EOPNOTSUPP when ufattr is NULL on tmpfs without
xattr support. However, file_setattr() always copy structure from
userspace early (via copy_struct_from_user) and returns EFAULT if the
pointer is invalid, before checking filesystem xattr support.
Therefore, the EOPNOTSUPP exception is only valid for file_getattr()
which does not read from ufattr early.
Restrict the EOPNOTSUPP expectation to file_getattr() (tst_variant != 0)
to avoid false failures on file_setattr().
Signed-off-by: Wake Liu <wakel@google.com>
---
testcases/kernel/syscalls/file_attr/file_attr01.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/file_attr/file_attr01.c b/testcases/kernel/syscalls/file_attr/file_attr01.c
index 419d54c36..2e6c07d07 100644
--- a/testcases/kernel/syscalls/file_attr/file_attr01.c
+++ b/testcases/kernel/syscalls/file_attr/file_attr01.c
@@ -119,7 +119,7 @@ static void run(unsigned int i)
struct tcase *tc = &tcases[i];
int exp_errno = tc->exp_errno;
- if (tc->ufattr == (struct file_attr **)(&null_ptr) && missing_tmpfs_xattr)
+ if (tc->ufattr == (struct file_attr **)(&null_ptr) && missing_tmpfs_xattr && tst_variant)
exp_errno = EOPNOTSUPP;
if (tst_variant) {
--
2.55.0.654.g21b8a5bc05-goog
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [LTP] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs
2026-08-07 10:44 [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs Wake Liu via ltp
@ 2026-08-07 11:04 ` linuxtestproject.agent
2026-08-10 9:36 ` [LTP] [PATCH] " Andrea Cervesato via ltp
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: linuxtestproject.agent @ 2026-08-07 11:04 UTC (permalink / raw)
To: Wake Liu; +Cc: ltp
Hi Wake,
On Aug 7, 2026, Wake Liu wrote:
> syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs
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] 5+ messages in thread* Re: [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs
2026-08-07 10:44 [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs Wake Liu via ltp
2026-08-07 11:04 ` [LTP] " linuxtestproject.agent
@ 2026-08-10 9:36 ` Andrea Cervesato via ltp
2026-08-10 12:21 ` Andrea Cervesato via ltp
2026-08-10 12:23 ` Andrea Cervesato via ltp
3 siblings, 0 replies; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2026-08-10 9:36 UTC (permalink / raw)
To: Wake Liu via ltp; +Cc: Wake Liu, ltp
Hi Wake,
where did you see this error? can you pleae provide more information?
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] 5+ messages in thread
* Re: [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs
2026-08-07 10:44 [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs Wake Liu via ltp
2026-08-07 11:04 ` [LTP] " linuxtestproject.agent
2026-08-10 9:36 ` [LTP] [PATCH] " Andrea Cervesato via ltp
@ 2026-08-10 12:21 ` Andrea Cervesato via ltp
2026-08-10 12:23 ` Andrea Cervesato via ltp
3 siblings, 0 replies; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2026-08-10 12:21 UTC (permalink / raw)
To: Wake Liu via ltp; +Cc: Wake Liu, ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
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] 5+ messages in thread
* Re: [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs
2026-08-07 10:44 [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs Wake Liu via ltp
` (2 preceding siblings ...)
2026-08-10 12:21 ` Andrea Cervesato via ltp
@ 2026-08-10 12:23 ` Andrea Cervesato via ltp
3 siblings, 0 replies; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2026-08-10 12:23 UTC (permalink / raw)
To: Wake Liu via ltp; +Cc: Wake Liu, ltp
Merged, Thanks!
--
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] 5+ messages in thread
end of thread, other threads:[~2026-08-10 12:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 10:44 [LTP] [PATCH] syscalls/file_attr01: Fix EOPNOTSUPP expectation on tmpfs Wake Liu via ltp
2026-08-07 11:04 ` [LTP] " linuxtestproject.agent
2026-08-10 9:36 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-08-10 12:21 ` Andrea Cervesato via ltp
2026-08-10 12:23 ` Andrea Cervesato via ltp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox