#! /bin/bash # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2018 Oracle, Inc. # # FS QA Test No. 449 # # Make sure pretty printed XFS geometry is the same across all programs. # . ./common/preamble _begin_fstest auto quick # Import common functions. . ./common/filter # real QA test starts here _supported_fs xfs _require_scratch_nocheck # Geometry printing wasn't unified until xfs_spaceman grew an 'info' # command, so skip this test if there is no spaceman or it doesn't # know what 'info' is. _require_xfs_spaceman_command "info" _require_command "$XFS_GROWFS_PROG" xfs_growfs _scratch_mkfs | sed -e '/Discarding/d' > $tmp.mkfs echo MKFS >> $seqres.full cat $tmp.mkfs >> $seqres.full _scratch_xfs_db -c "info" > $tmp.dbinfo echo DB >> $seqres.full cat $tmp.dbinfo >> $seqres.full # xfs_db doesn't take a rtdev argument, so it reports "realtime=external". # mkfs does, so make a quick substitution diff -u <(cat $tmp.mkfs | sed -e 's/realtime =\/.*extsz=/realtime =external extsz=/g') $tmp.dbinfo _scratch_mount $XFS_SPACEMAN_PROG -c "info" $SCRATCH_MNT > $tmp.spaceman echo SPACEMAN >> $seqres.full cat $tmp.spaceman >> $seqres.full diff -u $tmp.mkfs $tmp.spaceman $XFS_GROWFS_PROG -n $SCRATCH_MNT > $tmp.growfs echo GROWFS >> $seqres.full cat $tmp.growfs >> $seqres.full diff -u $tmp.mkfs $tmp.growfs $XFS_INFO_PROG $SCRATCH_MNT > $tmp.info.mnt echo INFO_MNT >> $seqres.full cat $tmp.info.mnt >> $seqres.full diff -u $tmp.mkfs $tmp.info.mnt $XFS_INFO_PROG $SCRATCH_DEV > $tmp.info.dev echo INFO_DEV >> $seqres.full cat $tmp.info.dev >> $seqres.full diff -u $tmp.mkfs $tmp.info.dev echo "Silence is golden." status=0 exit 0