Skip to content

Commit d37d472

Browse files
committed
selftests/mount_settattr: ensure that ext4 filesystem can be created
Filesystem too small for a journal mount: /mnt/D/: mount failed: Operation not permitted. mount_setattr_test.c:1076:idmap_mount_tree_invalid:Expected system("mount -o loop -t ext4 /mnt/C/ext4.img /mnt/D/") (256) == 0 (0) Signed-off-by: Christian Brauner <[email protected]>
1 parent 7a012a6 commit d37d472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/mount_setattr/mount_setattr_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ FIXTURE_SETUP(mount_setattr_idmapped)
10711071
ASSERT_EQ(mkdir("/mnt/D", 0777), 0);
10721072
img_fd = openat(-EBADF, "/mnt/C/ext4.img", O_CREAT | O_WRONLY, 0600);
10731073
ASSERT_GE(img_fd, 0);
1074-
ASSERT_EQ(ftruncate(img_fd, 1024 * 2048), 0);
1074+
ASSERT_EQ(ftruncate(img_fd, 2147483648 /* 2 GB */), 0);
10751075
ASSERT_EQ(system("mkfs.ext4 -q /mnt/C/ext4.img"), 0);
10761076
ASSERT_EQ(system("mount -o loop -t ext4 /mnt/C/ext4.img /mnt/D/"), 0);
10771077
ASSERT_EQ(close(img_fd), 0);

0 commit comments

Comments
 (0)