fstests: move test group info to test files
[xfstests-dev.git] / tests / xfs / 525
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2020 Oracle.  All Rights Reserved.
4 #
5 # FS QA Test No. 525
6 #
7 # Test formatting with a config file that contains conflicting options.
8 #
9 . ./common/preamble
10 _begin_fstest auto quick mkfs
11
12 # Override the default cleanup function.
13 _cleanup()
14 {
15         cd /
16         rm -f $tmp.* $def_cfgfile
17 }
18
19 # Import common functions.
20 . ./common/filter
21
22 # real QA test starts here
23
24 # Modify as appropriate.
25 _supported_fs xfs
26 _require_test
27 _require_scratch_nocheck
28 _require_xfs_mkfs_cfgfile
29
30 echo "Silence is golden"
31
32 def_cfgfile=$TEST_DIR/a
33 rm -rf $def_cfgfile
34
35 cat > $def_cfgfile << ENDL
36 [metadata]
37 crc = 0
38 rmapbt = 1
39 reflink = 1
40
41 [inode]
42 sparse = 1
43 ENDL
44
45 $MKFS_XFS_PROG -c options=$def_cfgfile -f $SCRATCH_DEV > $tmp.mkfs 2>&1
46 if [ $? -eq 0 ]; then
47         echo "mkfs.xfs did not fail!"
48         cat $tmp.mkfs
49 fi
50
51 # success, all done
52 status=0
53 exit