btrfs/14[01]: Use proper helper to get both devid and physical for corruption
[xfstests-dev.git] / README.config-sections
1 Configuration file with sections
2 ================================
3
4 Configuration file with sections is useful for running xfstests on multiple
5 file systems, or multiple file system setups in a single run without any
6 help of external scripts.
7
8
9 Syntax
10 ------
11
12 Syntax for defining a section is the following:
13
14         [section_name]
15
16 Section name should consist of alphanumeric characters and '_'. Anything
17 else is forbidden and the section will not be recognised.
18
19 Each section in the configuration file should contain options in the format
20
21         OPTION=value
22
23 'OPTION' must not contain any white space characters. 'value' can contain
24 any character you want with one simple limitation - characters ' and " can
25 only appear at the start and end of the 'value', however it is not required.
26
27 Note that options are carried between sections so the same options does not
28 have to be specified in each and every sections. However caution should be
29 exercised not to leave unwanted options set from previous sections.
30
31
32 Results
33 -------
34
35 For every section xfstests will run with specified options and will produce
36 separate results in the '$RESULT_BASE/$section_name' directory.
37
38
39 Different mount options
40 -----------------------
41
42 Specifying different mount options in difference config sections is allowed.
43 When TEST_FS_MOUNT_OPTS differs in the following section TEST_DEV will be
44 remounted with new TEST_FS_MOUNT_OPTS automatically before running the test.
45
46
47 Multiple file systems
48 ---------------------
49
50 Having different file systems in different config sections is allowed. When
51 FSTYP differs in the following section the FSTYP file system will be created
52 automatically before running the test.
53
54 Note that if TEST_FS_MOUNT_OPTS, MOUNT_OPTIONS, MKFS_OPTIONS, or FSCK_OPTIONS
55 are not directly specified in the section it will be reset to the default for a
56 given file system.
57
58 You can also force the file system recreation by specifying RECREATE_TEST_DEV.
59
60 Run specified section only
61 --------------------------
62
63 Specifying '-s' argument with section name will run only the section
64 specified. The '-s' argument can be specified multiple times to allow multiple
65 sections to be run.
66
67 The options are still carried between section, that includes the sections
68 which are not going to be run. So you can do something like
69
70 [ext4]
71 TEST_DEV=/dev/sda1
72 TEST_DIR=/mnt/test
73 SCRATCH_DEV=/dev/sdb1
74 SCRATCH_MNT=/mnt/test1
75 FSTYP=ext4
76
77 [xfs]
78 FSTYP=xfs
79
80 [btrfs]
81 FSTYP=btrfs
82
83
84 and run
85
86 ./check -s xfs -s btrfs
87
88 to check xfs and btrfs only. All the devices and mounts are still going to
89 be parsed from the section [ext4].
90
91 Example
92 -------
93
94 Here is an example of config file with sections:
95
96 [ext4_4k_block_size]
97 TEST_DEV=/dev/sda
98 TEST_DIR=/mnt/test
99 SCRATCH_DEV=/dev/sdb
100 SCRATCH_MNT=/mnt/test1
101 MKFS_OPTIONS="-q -F -b4096"
102 FSTYP=ext4
103 RESULT_BASE="`pwd`/results/`date +%d%m%y_%H%M%S`"
104
105 [ext4_1k_block_size]
106 MKFS_OPTIONS="-q -F -b1024"
107
108 [ext4_nojournal]
109 MKFS_OPTIONS="-q -F -b4096 -O ^has_journal"
110
111 [xfs_filesystem]
112 MKFS_OPTIONS="-f"
113 FSTYP=xfs
114
115 [ext3_filesystem]
116 FSTYP=ext3
117 MOUNT_OPTIONS="-o noatime"
118
119 [cephfs]
120 TEST_DIR=/mnt/test
121 TEST_DEV=192.168.14.1:6789:/
122 TEST_FS_MOUNT_OPTS="-o name=admin,secret=AQDuEBtYKEYRINGSECRETriSC8YJGDZsQHcr7g=="
123 FSTYP="ceph"
124
125 [glusterfs]
126 FSTYP=glusterfs
127 TEST_DIR=/mnt/gluster/test
128 TEST_DEV=192.168.1.1:testvol
129 SCRATCH_MNT=/mnt/gluster/scratch
130 SCRATCH_DEV=192.168.1.1:scratchvol