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 _begin_fstest auto quick mkfs
12 # Override the default cleanup function.
16 rm -f $tmp.* $def_cfgfile
19 # Import common functions.
22 # real QA test starts here
24 # Modify as appropriate.
27 _require_scratch_nocheck
28 _require_xfs_mkfs_cfgfile
33 # disable crc in config file, enable rmapbt (which requires crc=1) in cli
34 cat > $cfgfile << ENDL
39 $MKFS_XFS_PROG -c options=$cfgfile -f -m rmapbt=1 $SCRATCH_DEV > $tmp.mkfs 2>&1
40 cat $tmp.mkfs >> $seqres.full
41 grep 'rmapbt not supported without CRC support' $tmp.mkfs
43 # enable rmapbt (which requires crc=1) in config file, disable crc in cli
44 cat > $cfgfile << ENDL
49 $MKFS_XFS_PROG -c options=$cfgfile -f -m crc=0 $SCRATCH_DEV > $tmp.mkfs 2>&1
50 cat $tmp.mkfs >> $seqres.full
51 grep 'rmapbt not supported without CRC support' $tmp.mkfs