Skip to content

Commit c465f55

Browse files
committed
selftests/mount_setattr: increase tmpfs size for idmapped mount tests
The mount_setattr_idmapped fixture mounts a 2 MB tmpfs at /mnt and then creates a 2 GB sparse ext4 image at /mnt/C/ext4.img. While ftruncate() succeeds (sparse file), mkfs.ext4 needs to write actual metadata blocks (inode tables, journal, bitmaps) which easily exceeds the 2 MB tmpfs limit, causing ENOSPC and failing the fixture setup for all mount_setattr_idmapped tests. This was introduced by commit d37d472 ("selftests/mount_settattr: ensure that ext4 filesystem can be created") which increased the image size from 2 MB to 2 GB but didn't adjust the tmpfs size. Bump the tmpfs size to 256 MB which is sufficient for the ext4 metadata. Fixes: d37d472 ("selftests/mount_settattr: ensure that ext4 filesystem can be created") Signed-off-by: Christian Brauner <[email protected]>
1 parent f8b8820 commit c465f55

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/mount_setattr/mount_setattr_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ FIXTURE_SETUP(mount_setattr_idmapped)
10201020
"size=100000,mode=700"), 0);
10211021

10221022
ASSERT_EQ(mount("testing", "/mnt", "tmpfs", MS_NOATIME | MS_NODEV,
1023-
"size=2m,mode=700"), 0);
1023+
"size=256m,mode=700"), 0);
10241024

10251025
ASSERT_EQ(mkdir("/mnt/A", 0777), 0);
10261026

0 commit comments

Comments
 (0)