2849fd55757b8acb056be8f4e7637fc758708f95
[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 MOUNT_OPTIONS differs in the following section TEST_DEV will be remounted
44 with new MOUNT_OPTIONS 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 MOUNT_OPTIONS, MKFS_OPTIONS, or FSCK_OPTIONS are not directly
55 specified in the section it will be reset to the default for a given file
56 system.
57
58 You can also force the file system recreation by specifying RECREATE_TEST_DEV.
59
60
61 Example
62 -------
63
64 Here is an example of config file with sections:
65
66 [ext4_4k_block_size]
67 TEST_DEV=/dev/sda
68 TEST_DIR=/mnt/test
69 SCRATCH_DEV=/dev/sdb
70 SCRATCH_MNT=/mnt/test1
71 MKFS_OPTIONS="-q -F -b4096"
72 FSTYP=ext4
73 RESULT_BASE="`pwd`/results/`date +%d%m%y_%H%M%S`"
74
75 [ext4_1k_block_size]
76 MKFS_OPTIONS="-q -F -b1024"
77
78 [ext4_nojournal]
79 MKFS_OPTIONS="-q -F -b4096 -O ^has_journal"
80
81 [xfs_filesystem]
82 MKFS_OPTIONS="-f"
83 FSTYP=xfs
84
85 [ext3_filesystem]
86 FSTYP=ext3
87 MOUNT_OPTIONS="-o noatime"