Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] fstests: vfstest: skip rejected tmpfile creation
@ 2026-07-17  7:07 Qu Wenruo
  2026-07-17 20:19 ` Boris Burkov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Qu Wenruo @ 2026-07-17  7:07 UTC (permalink / raw)
  To: fstests, linux-btrfs

Since kernel commit 539dce114465 ("fs: refuse O_TMPFILE creation with an
unmapped fsuid or fsgid"), tmpfile creation can be rejected with
EOVERFLOW, so also skip that error number to avoid false alerts like the
following:

 FSTYP         -- ext4
 PLATFORM      -- Linux/x86_64 btrfs-vm 7.2.0-rc3-custom+ #411 SMP PREEMPT_DYNAMIC Fri Jul 17 16:24:34 ACST 2026
 MKFS_OPTIONS  -- -F /dev/mapper/test-scratch1
 MOUNT_OPTIONS -- -o acl,user_xattr /dev/mapper/test-scratch1 /mnt/scratch

 generic/633  1s ... - output mismatch (see /home/adam/xfstests/results//generic/633.out.bad)
    --- tests/generic/633.out	2022-05-11 11:25:30.816666664 +0930
    +++ /home/adam/xfstests/results//generic/633.out.bad	2026-07-17 16:25:45.033967541 +0930
    @@ -1,2 +1,4 @@
     QA output created by 633
     Silence is golden
    +utils.c: 948: openat_tmpfile_supported - Value too large for defined data type - failure: create
    +utils.c: 948: openat_tmpfile_supported - Value too large for defined data type - failure: create
    ...
    (Run 'diff -u /home/adam/xfstests/tests/generic/633.out /home/adam/xfstests/results//generic/633.out.bad'  to see the entire diff)
 Ran: generic/633
 Failures: generic/633
 Failed 1 of 1 tests

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 src/vfs/utils.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/vfs/utils.c b/src/vfs/utils.c
index 0b435afe..d2922cc3 100644
--- a/src/vfs/utils.c
+++ b/src/vfs/utils.c
@@ -941,7 +941,11 @@ bool openat_tmpfile_supported(int dirfd)
 
 	fd = openat(dirfd, ".", O_TMPFILE | O_RDWR, S_IXGRP | S_ISGID);
 	if (fd == -1) {
-		if (errno == ENOTSUP) {
+		/*
+		 * Kernel commit 539dce114465 ("fs: refuse O_TMPFILE creation
+		 * with an unmapped fsuid or fsgid") will reject such operation.
+		 */
+		if (errno == ENOTSUP || errno == EOVERFLOW) {
 			errno = 0; /* Don't report misleading errno. */
 			return false;
 		} else {
-- 
2.51.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-20  8:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17  7:07 [PATCH] fstests: vfstest: skip rejected tmpfile creation Qu Wenruo
2026-07-17 20:19 ` Boris Burkov
2026-07-19  7:20 ` Zorro Lang
2026-07-20  8:10 ` Christoph Hellwig
2026-07-20  8:42   ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox