check: Allow to recreate TEST_DEV

Add config option RECREATE_TEST_DEV to allow to recreate file system on
the TEST_DEV device. Permitted values are true and false.

If RECREATE_TEST_DEV is set to true the TEST_DEV device will be
unmounted and FSTYP file system will be created on it. Afterwards it
will be mounted to TEST_DIR again with the default, or specified mount
options.

Also recreate the file system if FSTYP differs from the previous
section.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Lukas Czerner
2014-04-04 17:18:15 +11:00
committed by Dave Chinner
parent 667308dd97
commit f8e4f532f1
4 changed files with 189 additions and 19 deletions
+36 -7
View File
@@ -5,16 +5,20 @@ 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.
Syntax
------
Syntax for defining a section is the following:
[section_name]
[section_name]
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
OPTION=value
OPTION=value
'OPTION' must not contain any white space characters. 'value' can contain
any character you want with one simple limitation - characters ' and " can
@@ -24,9 +28,31 @@ 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.
Results
-------
For every section xfstests will run with specified options and will produce
separate results in the '$RESULT_BASE/$section_name' directory.
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.
Note that if 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.
You can also force the file system recreation by specifying RECREATE_TEST_DEV.
Example
-------
Here is an example of config file with sections:
[ext4_4k_block_size]
@@ -36,6 +62,7 @@ SCRATCH_DEV=/dev/sdb
SCRATCH_MNT=/mnt/test1
MKFS_OPTIONS="-q -F -b4096"
FSTYP=ext4
RESULT_BASE="`pwd`/results/`date +%d%m%y_%H%M%S`"
[ext4_1k_block_size]
MKFS_OPTIONS="-q -F -b1024"
@@ -43,8 +70,10 @@ MKFS_OPTIONS="-q -F -b1024"
[ext4_nojournal]
MKFS_OPTIONS="-q -F -b4096 -O ^has_journal"
[ext4_discard_ssd]
MKFS_OPTIONS="-q -F -b4096"
TEST_DEV=/dev/sdc
SCRATCH_DEV=/dev/sdd
MOUNT_OPTIONS="-o discard"
[xfs_filesystem]
MKFS_OPTIONS="-f"
FSTYP=xfs
[ext3_filesystem]
FSTYP=ext3
MOUNT_OPTIONS="-o noatime"