A recent change to XFSQA to resolve mkfs option conflicts means mkfs can be run twice per _scratch_mkfs_xfs:

$MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV
    local mkfs_status=$?

    # a mkfs failure may be caused by conflicts between
    # $MKFS_OPTIONS and $extra_mkfs_options

    if [ $mkfs_status -ne 0 -a ! -z "$extra_mkfs_options" ]; then
        echo "** mkfs failed with extra mkfs options added to \"$MKFS_OPTIONS\" by test $seq **" \
            >>$here/$seq.full
        echo "** attempting to mkfs using only test $seq options: $extra_mkfs_options **" \
            >>$here/$seq.full
        $MKFS_XFS_PROG $SCRATCH_OPTIONS $extra_mkfs_options $SCRATCH_DEV
        mkfs_status=$?
    fi

In the case of a failure caused by conflict between $MKFS_OPTIONS and $extra_mkfs_options,
the mkfs output is shown twice, first off is the failed mkfs output, secondly the resolved mkfs output.

This can cause QA failures for a number of tests, particularly those that filter the mkfs output.

This change shows only the applied (final) mkfs output from _scratch_mkfs_xfs.
Merge of master-melb:xfs-cmds:29041a by kenmcd.
This commit is contained in:
David Disseldorp
2007-07-03 04:01:25 +00:00
parent 9f01882691
commit 72b4e6cb85
+15 -3
View File
@@ -197,9 +197,14 @@ _scratch_mkfs_xfs()
# extra mkfs options can be added by tests
local extra_mkfs_options=$*
local tmp_dir=/tmp/
_scratch_options mkfs
$MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV
# save mkfs output in case conflict means we need to run again.
# only the output for the mkfs that applies should be shown
$MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV \
2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
local mkfs_status=$?
# a mkfs failure may be caused by conflicts between
@@ -210,12 +215,19 @@ _scratch_mkfs_xfs()
>>$here/$seq.full
echo "** attempting to mkfs using only test $seq options: $extra_mkfs_options **" \
>>$here/$seq.full
$MKFS_XFS_PROG $SCRATCH_OPTIONS $extra_mkfs_options $SCRATCH_DEV
# running mkfs again. overwrite previous mkfs output files
$MKFS_XFS_PROG $SCRATCH_OPTIONS $extra_mkfs_options $SCRATCH_DEV \
2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
mkfs_status=$?
fi
# output stored mkfs output
cat $tmp_dir.mkfserr >&2
cat $tmp_dir.mkfsstd
rm -f $tmp_dir.mkfserr $tmp_dir.mkfsstd
if [ "$USE_BIG_LOOPFS" = yes ]; then
[ -z "$RETAIN_AG_BYTES" ] && RETAIN_AG_BYTES=0
[ -z "$RETAIN_AG_BYTES" ] && RETAIN_AG_BYTES=0
./tools/ag-wipe -q -r $RETAIN_AG_BYTES $SCRATCH_DEV
fi