fstests: teach _scratch_mkfs to handle mkfs option conflicts

Currently in _scratch_mkfs only xfs and ext4 could handle the mkfs
failure caused by conflicts between $MKFS_OPTIONS and mkfs options
specified by tests, because of _scratch_mkfs_xfs and
_scratch_mkfs_ext4. This is a very useful functionality that allows
tests to specify mkfs options safely and to test specific fs
configurations, without worrying about mkfs failures caused by these
options.

Now teach _scratch_mkfs to handle such mkfs option conflicts for
other filesystems too, i.e. mkfs again only with mkfs options
specified by tests. Also add the ability to filter unnecessary
messages from mkfs stderr.

Also update some btrfs tests to throw away _scratch_mkfs stdout,
because previously _scratch_mkfs did this for btrfs.

Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Eryu Guan
2016-12-05 00:15:08 +08:00
parent c1cd6b1d57
commit 596a068bf1
7 changed files with 126 additions and 111 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ _supported_os Linux
_require_scratch
_require_btrfs_qgroup_report
_scratch_mkfs
_scratch_mkfs >/dev/null
_scratch_mount
_run_btrfs_util_prog quota enable $SCRATCH_MNT