ext4: use mkfs.ext4 -F instead of piping in yes
authorTheodore Ts'o <tytso@mit.edu>
Mon, 29 Sep 2014 02:47:02 +0000 (12:47 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 29 Sep 2014 02:47:02 +0000 (12:47 +1000)
Using "yes | mkfs.ext4 ..." results in the error message results in
the test failing, at least for some versions of e2fsprogs:

    +yes: standard output: Broken pipe
    +yes: write error

It better to use the -F option, which will eliminate the questions.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/ext4/003
tests/ext4/306

index fde0e9c1bf7470258dad622bbdb8d3df2b881f52..53875a94dd59ffd0f1c39437f2f72ff3c23f5588 100755 (executable)
@@ -43,7 +43,7 @@ _require_ext4_bigalloc
 
 rm -f $seqres.full
 
-yes | $MKFS_EXT4_PROG -O bigalloc -C 65536  -g 256 $SCRATCH_DEV 512m \
+$MKFS_EXT4_PROG -F -O bigalloc -C 65536  -g 256 $SCRATCH_DEV 512m \
        >> $seqres.full 2>&1
 _scratch_mount || _fail "couldn't mount fs"
 
index caffe0e441cd60ccf5baff074c0772ad76303a23..edc02045bc334b7b481d565f83612868bce876ea 100755 (executable)
@@ -48,7 +48,7 @@ _require_scratch
 rm -f $seqres.full
 
 # Make a small ext4 fs with extents disabled & mount it
-yes | $MKFS_EXT4_PROG -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1
+$MKFS_EXT4_PROG -F -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1
 _scratch_mount || _fail "couldn't mount fs"
 
 # Create a small non-extent-based file