xfstests: _filter_mkfs should consume input from stdin for non-xfs fs
authorEryu Guan <eguan@redhat.com>
Tue, 12 Nov 2013 07:59:18 +0000 (07:59 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 13 Nov 2013 02:19:00 +0000 (20:19 -0600)
_filter_mkfs is a filter so that it should read from stdin first
before printing anything out. Otherwise the command prior to the
pipeline may get EPIPE.

I saw this when testing extN with generic/204, _scratch_mkfs_sized was
unable to create fs because of EPIPE, then _scratch_mount failed.

generic/204 12s ... [failed, exit status 1] - output mismatch (see /root/xfstests/results//generic/204.out.bad)
    --- tests/generic/204.out   2013-11-01 16:47:56.728591856 +0800
    +++ /root/xfstests/results//generic/204.out.bad     2013-11-01 22:52:53.207828779 +0800
    @@ -1,2 +1,7 @@
     QA output created by 204
    -*** done
    +mount: wrong fs type, bad option, bad superblock on /dev/sda6,
    +       missing codepage or helper program, or other error
    +       In some cases useful info is found in syslog - try
    +       dmesg | tail  or so
    +

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common/filter

index e37ce690cdd1211abeb19b36f299917725f0f827..c872a27bcba437772731071c5425378205c59490 100644 (file)
@@ -138,6 +138,7 @@ _filter_mkfs()
     xfs)
        ;;
     *)
+       cat - >/dev/null
        perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
        return ;;
     esac