[PATCH 28/33] generic/405: don't stall on mkfs asking for input

Darrick J. Wong
2025-10-29T01:27:43Z

If you try to test ext4 with 8k block size, this test will hang forever
on:

mke2fs 1.47.4~WIP-2025-07-09 (9-Jul-2025)
mkfs.fuse.ext4: 8192-byte blocks too big for system (max 4096)
Proceed anyway? (y,N)

Because we invoked mkfs directly
---
tests/generic/405 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/405 b/tests/generic/405
index c90190c8d28457..0cf5b76a7c20cc 100755
--- a/tests/generic/405
+++ b/tests/generic/405
@@ -36,7 +36,7 @@ _dmthin_init $BACKING_SIZE $VIRTUAL_SIZE
# try mkfs on dmthin device, expect mkfs failure if 1M isn't big enough to hold
# all the metadata. But if mkfs returns success, we expect the filesystem is
# consistent, make sure it doesn't currupt silently.
-$MKFS_PROG -t $FSTYP $DMTHIN_VOL_DEV >>$seqres.full 2>&1
+yes | $MKFS_PROG -t $FSTYP $DMTHIN_VOL_DEV >>$seqres.full 2>&1
if [ $? -eq 0 ]; then
_dmthin_check_fs
fi