]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common: use mke2fs -F instead of piping in yes
authorTheodore Ts'o <tytso@mit.edu>
Mon, 15 Dec 2014 23:50:21 +0000 (10:50 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 15 Dec 2014 23:50:21 +0000 (10:50 +1100)
commita5a2db3aba180628cb18ed39634c1d1c412f0de4
treed0226f8446386fc9339081166363094b92980e96
parentf5b137bd8b3eb992cc2daf883bfe1e34b743ddb8
common: use mke2fs -F instead of piping in yes

It's possible based on a race conditions (and possibly the version of
coreutils which supplies /usr/bin/yes) that commands of the form:

yes | $MKFS_PROG ...

will end up causing the following failure:

shared/298 16s ... [23:49:03] [23:49:19] - output mismatch (see /results/results-4k/shared/298.out.bad)
    --- tests/shared/298.out 2014-10-31 10:13:04.000000000 -0400
    +++ /results/results-4k/shared/298.out.bad 2014-11-29 23:49:19.118138099 -0500
    @@ -1,4 +1,6 @@
     QA output created by 298
    +yes: standard output: Broken pipe
    +yes: write error
     Generating garbage on loop...done.
     Running fstrim...done.
     Detecting interesting holes in image...done.
    ...
    (Run 'diff -u tests/shared/298.out /results/results-4k/shared/298.out.bad'  to see the entire diff)

Using mke2fs's -F option instad of "yes | $MKFS_PROG" fixes this issue.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc