2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2020 Oracle. All Rights Reserved.
7 # Test formatting with conflicts between the config file and the cli.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap '_cleanup; exit $status' 0 1 2 3 15
21 rm -f $tmp.* $def_cfgfile
24 # get standard environment, filters and checks
28 # remove previous $seqres.full before test
31 # real QA test starts here
33 # Modify as appropriate.
36 _require_scratch_nocheck
37 _require_xfs_mkfs_cfgfile
42 # disable crc in config file, enable rmapbt (which requires crc=1) in cli
43 cat > $cfgfile << ENDL
48 $MKFS_XFS_PROG -c options=$cfgfile -f -m rmapbt=1 $SCRATCH_DEV > $tmp.mkfs 2>&1
49 cat $tmp.mkfs >> $seqres.full
50 grep 'rmapbt not supported without CRC support' $tmp.mkfs
52 # enable rmapbt (which requires crc=1) in config file, disable crc in cli
53 cat > $cfgfile << ENDL
58 $MKFS_XFS_PROG -c options=$cfgfile -f -m crc=0 $SCRATCH_DEV > $tmp.mkfs 2>&1
59 cat $tmp.mkfs >> $seqres.full
60 grep 'rmapbt not supported without CRC support' $tmp.mkfs