Commit c465f559 authored by Christian Brauner's avatar Christian Brauner
Browse files

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 d37d4720 ("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: d37d4720 ("selftests/mount_settattr: ensure that ext4 filesystem can be created")
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent f8b8820a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1020,7 +1020,7 @@ FIXTURE_SETUP(mount_setattr_idmapped)
			"size=100000,mode=700"), 0);

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

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