2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2020 Oracle. All Rights Reserved.
7 # Test formatting with a well known config file.
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 $fsimg
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
39 echo "Silence is golden"
41 def_cfgfile=$TEST_DIR/a
43 rm -f $def_cfgfile $fsimg
44 $XFS_IO_PROG -c "truncate 20t" -f $fsimg
46 cat > $def_cfgfile << ENDL
56 $MKFS_XFS_PROG -c options=$def_cfgfile -f $SCRATCH_DEV > $tmp.mkfs
57 cat $tmp.mkfs >> $seqres.full
58 grep -q 'crc=1' $tmp.mkfs || echo 'v5 not enabled'
59 grep -q 'rmapbt=1' $tmp.mkfs || echo 'rmap not enabled'
60 grep -q 'reflink=1' $tmp.mkfs || echo 'reflink not enabled'
61 grep -q 'sparse=1' $tmp.mkfs || echo 'sparse inodes not enabled'