fstests: vfstest: skip rejected tmpfile creation
Subsystems (2)
PATCH 1/1 fstests: vfstest: skip rejected tmpfile creation
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
--- src/vfs/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
src/vfs/utils.c +5 -1
@@ -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 {
Signature · 1 line
2.51.2
Quoted 10 lines · Qu Wenruo
Since kernel commit
539dce114465("fs: refuseO_TMPFILEcreation 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
Quoted 14 lines
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.bad2026-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
Quoted 25 lines
Signed-off-by Qu Wenruo <[email protected]>--- src/vfs/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)src/vfs/utils.c +5
-1@@ -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 {Signature · 1 line
2.51.2
Quoted 34 lines · Qu Wenruo
Since kernel commit
539dce114465("fs: refuseO_TMPFILEcreation 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/scratchgeneric/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.bad2026-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 testsSigned-off-by Qu Wenruo <[email protected]>--- src/vfs/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)src/vfs/utils.c +0
-0
src/vfs/utils.c bool openat_tmpfile_supported(int dirfd) · line 948
Quoted 9 lines
src/vfs/utils.c +5
-1@@ -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 ) {
Makes sense to me,
Quoted 7 lines
src/vfs/utils.c +0
-0errno =0 ;/* Don't report misleading errno. */ return false; }else {Signature · 1 line
2.51.2
Christian indicated the fixes for this are in the (somewhat confusingly titled) "[PATCH 0/2] Support overlayfs in the idmapped mount tests" series.
It would be good to get a proper review for this as it's beyond my pay grade.
Quoted 50 lines · Qu Wenruo
Since kernel commit
539dce114465("fs: refuseO_TMPFILEcreation 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/scratchgeneric/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.bad2026-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 testsSigned-off-by Qu Wenruo <[email protected]>--- src/vfs/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)src/vfs/utils.c +5
-1@@ -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 {Signature · 1 line
2.51.2
---end quoted text---
Quoted 6 lines · Christoph Hellwig
Christian indicated the fixes for this are in the (somewhat confusingly titled) "[PATCH 0/2] Support overlayfs in the idmapped mount tests" series.
It would be good to get a proper review for this as it's beyond my pay grade.
Thanks a lot for pointing that series out.
That series hit me but the name didn't ring my bell initially.
But the commit message of the first patch makes more sense now, and please drop this patch.
This one is really masking the problem, meanwhile that first patch of that series is fixing it in a better way.
Please drop this patch.
Thanks,
Qu
Quoted 54 lines · Qu Wenruo
Quoted 50 lines
Since kernel commit
539dce114465("fs: refuseO_TMPFILEcreation 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/scratchgeneric/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.bad2026-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 testsSigned-off-by Qu Wenruo <[email protected]>--- src/vfs/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)src/vfs/utils.c +5
-1@@ -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 {Signature · 1 line
2.51.2---end quoted text---