]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/xfs: standardize the xfs_scrub output that gets recorded to $seqres.full
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Oct 2017 05:51:51 +0000 (22:51 -0700)
committerEryu Guan <eguan@redhat.com>
Fri, 3 Nov 2017 11:04:49 +0000 (19:04 +0800)
Make the xfs_scrub output that gets recorded to $seqres.full follow
the format of xfs_repair checks.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/xfs

index 95dde603cf99930239c38d956db4ad158a051ca0..98dcae7b415fd4de63ea693d92bd0c855d61acb2 100644 (file)
@@ -357,11 +357,15 @@ _check_xfs_filesystem()
        # Run online scrub if we can.
        mntpt="$(_is_mounted $device)"
        if [ -n "$mntpt" ] && _supports_xfs_scrub "$mntpt" "$device"; then
-               "$XFS_SCRUB_PROG" $scrubflag -v -d -n $device >>$seqres.full 2>&1
+               "$XFS_SCRUB_PROG" $scrubflag -v -d -n $device > $tmp.scrub 2>&1
                if [ $? -ne 0 ]; then
-                       _log_err "filesystem on $device failed scrub"
+                       _log_err "_check_xfs_filesystem: filesystem on $device failed scrub"
+                       echo "*** xfs_scrub $scrubflag -v -d -n output ***" >> $seqres.full
+                       cat $tmp.scrub >> $seqres.full
+                       echo "*** end xfs_scrub output" >> $serqres.full
                        ok=0
                fi
+               rm -f $tmp.scrub
        fi
 
        if [ "$type" = "xfs" ]; then