filter: latest mkfs.xfs makes logical sector size noise
authorDave Chinner <dchinner@redhat.com>
Thu, 14 May 2015 02:17:29 +0000 (12:17 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 14 May 2015 02:17:29 +0000 (12:17 +1000)
On devices that have a logical sector smaller than physical sector,
this extra, harmless output now occurs:

     QA output created by 060
    +specified blocksize 1024 is less than device physical sector size 4096
    +switching to logical sector size 512
     Creating directory system to dump using src/fill.
     Setup .......................................
     Dumping to files...

And it causes lots of tests to fail unnecessarily. Filter it.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc

index 6ea107e1efea33e7112952882b070574daaf6b9d..242dedb04e14a1d0863b6be3ee79e13ea5d5f7b3 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -365,9 +365,12 @@ _scratch_mkfs_xfs()
                mkfs_status=$?
        fi
 
-       # output stored mkfs output
-       cat $tmp_dir.mkfserr >&2
+       # output stored mkfs output, filtering unnecessary warnings from stderr
        cat $tmp_dir.mkfsstd
+       cat $tmp_dir.mkfserr | sed \
+               -e '/less than device physical sector/d' \
+               -e '/switching to logical sector/d' \
+               >&2
        rm -f $tmp_dir.mkfserr $tmp_dir.mkfsstd
 
        return $mkfs_status