2014-04-04 17:18:04 +11:00
|
|
|
Configuration file with sections
|
|
|
|
|
================================
|
|
|
|
|
|
|
|
|
|
Configuration file with sections is useful for running xfstests on multiple
|
|
|
|
|
file systems, or multiple file system setups in a single run without any
|
|
|
|
|
help of external scripts.
|
|
|
|
|
|
2014-04-04 17:18:15 +11:00
|
|
|
|
|
|
|
|
Syntax
|
|
|
|
|
------
|
|
|
|
|
|
2014-04-04 17:18:04 +11:00
|
|
|
Syntax for defining a section is the following:
|
|
|
|
|
|
2014-04-04 17:18:15 +11:00
|
|
|
[section_name]
|
2014-04-04 17:18:04 +11:00
|
|
|
|
|
|
|
|
Section name should consist of alphanumeric characters and '_'. Anything
|
|
|
|
|
else is forbidden and the section will not be recognised.
|
|
|
|
|
|
|
|
|
|
Each section in the configuration file should contain options in the format
|
|
|
|
|
|
2014-04-04 17:18:15 +11:00
|
|
|
OPTION=value
|
2014-04-04 17:18:04 +11:00
|
|
|
|
|
|
|
|
'OPTION' must not contain any white space characters. 'value' can contain
|
|
|
|
|
any character you want with one simple limitation - characters ' and " can
|
|
|
|
|
only appear at the start and end of the 'value', however it is not required.
|
|
|
|
|
|
|
|
|
|
Note that options are carried between sections so the same options does not
|
|
|
|
|
have to be specified in each and every sections. However caution should be
|
|
|
|
|
exercised not to leave unwanted options set from previous sections.
|
|
|
|
|
|
2014-04-04 17:18:15 +11:00
|
|
|
|
|
|
|
|
Results
|
|
|
|
|
-------
|
|
|
|
|
|
2014-04-04 17:18:04 +11:00
|
|
|
For every section xfstests will run with specified options and will produce
|
|
|
|
|
separate results in the '$RESULT_BASE/$section_name' directory.
|
|
|
|
|
|
2014-04-04 17:18:15 +11:00
|
|
|
|
2014-04-04 17:18:24 +11:00
|
|
|
Different mount options
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
Specifying different mount options in difference config sections is allowed.
|
2017-08-02 21:49:00 +08:00
|
|
|
When TEST_FS_MOUNT_OPTS differs in the following section TEST_DEV will be
|
|
|
|
|
remounted with new TEST_FS_MOUNT_OPTS automatically before running the test.
|
2014-04-04 17:18:24 +11:00
|
|
|
|
|
|
|
|
|
2014-04-04 17:18:15 +11:00
|
|
|
Multiple file systems
|
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
|
Having different file systems in different config sections is allowed. When
|
|
|
|
|
FSTYP differs in the following section the FSTYP file system will be created
|
|
|
|
|
automatically before running the test.
|
|
|
|
|
|
2017-08-02 21:49:00 +08:00
|
|
|
Note that if TEST_FS_MOUNT_OPTS, MOUNT_OPTIONS, MKFS_OPTIONS, or FSCK_OPTIONS
|
|
|
|
|
are not directly specified in the section it will be reset to the default for a
|
|
|
|
|
given file system.
|
2014-04-04 17:18:15 +11:00
|
|
|
|
|
|
|
|
You can also force the file system recreation by specifying RECREATE_TEST_DEV.
|
|
|
|
|
|
2014-04-11 10:19:29 +10:00
|
|
|
Run specified section only
|
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
|
|
Specifying '-s' argument with section name will run only the section
|
|
|
|
|
specified. The '-s' argument can be specified multiple times to allow multiple
|
|
|
|
|
sections to be run.
|
|
|
|
|
|
|
|
|
|
The options are still carried between section, that includes the sections
|
|
|
|
|
which are not going to be run. So you can do something like
|
|
|
|
|
|
|
|
|
|
[ext4]
|
|
|
|
|
TEST_DEV=/dev/sda1
|
|
|
|
|
TEST_DIR=/mnt/test
|
|
|
|
|
SCRATCH_DEV=/dev/sdb1
|
|
|
|
|
SCRATCH_MNT=/mnt/test1
|
|
|
|
|
FSTYP=ext4
|
|
|
|
|
|
|
|
|
|
[xfs]
|
|
|
|
|
FSTYP=xfs
|
|
|
|
|
|
|
|
|
|
[btrfs]
|
|
|
|
|
FSTYP=btrfs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and run
|
|
|
|
|
|
|
|
|
|
./check -s xfs -s btrfs
|
|
|
|
|
|
|
|
|
|
to check xfs and btrfs only. All the devices and mounts are still going to
|
|
|
|
|
be parsed from the section [ext4].
|
2014-04-04 17:18:15 +11:00
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
2014-04-04 17:18:04 +11:00
|
|
|
Here is an example of config file with sections:
|
|
|
|
|
|
|
|
|
|
[ext4_4k_block_size]
|
|
|
|
|
TEST_DEV=/dev/sda
|
|
|
|
|
TEST_DIR=/mnt/test
|
|
|
|
|
SCRATCH_DEV=/dev/sdb
|
|
|
|
|
SCRATCH_MNT=/mnt/test1
|
|
|
|
|
MKFS_OPTIONS="-q -F -b4096"
|
|
|
|
|
FSTYP=ext4
|
2014-04-04 17:18:15 +11:00
|
|
|
RESULT_BASE="`pwd`/results/`date +%d%m%y_%H%M%S`"
|
2014-04-04 17:18:04 +11:00
|
|
|
|
|
|
|
|
[ext4_1k_block_size]
|
|
|
|
|
MKFS_OPTIONS="-q -F -b1024"
|
|
|
|
|
|
|
|
|
|
[ext4_nojournal]
|
|
|
|
|
MKFS_OPTIONS="-q -F -b4096 -O ^has_journal"
|
|
|
|
|
|
2014-04-04 17:18:15 +11:00
|
|
|
[xfs_filesystem]
|
|
|
|
|
MKFS_OPTIONS="-f"
|
|
|
|
|
FSTYP=xfs
|
|
|
|
|
|
|
|
|
|
[ext3_filesystem]
|
|
|
|
|
FSTYP=ext3
|
|
|
|
|
MOUNT_OPTIONS="-o noatime"
|
2016-11-04 11:04:39 +01:00
|
|
|
|
|
|
|
|
[cephfs]
|
|
|
|
|
TEST_DIR=/mnt/test
|
|
|
|
|
TEST_DEV=192.168.14.1:6789:/
|
|
|
|
|
TEST_FS_MOUNT_OPTS="-o name=admin,secret=AQDuEBtYKEYRINGSECRETriSC8YJGDZsQHcr7g=="
|
|
|
|
|
FSTYP="ceph"
|
2017-03-16 13:28:19 +08:00
|
|
|
|
|
|
|
|
[glusterfs]
|
|
|
|
|
FSTYP=glusterfs
|
|
|
|
|
TEST_DIR=/mnt/gluster/test
|
|
|
|
|
TEST_DEV=192.168.1.1:testvol
|
|
|
|
|
SCRATCH_MNT=/mnt/gluster/scratch
|
|
|
|
|
SCRATCH_DEV=192.168.1.1:scratchvol
|