fstests: teach _scratch_mkfs to handle mkfs option conflicts
authorEryu Guan <eguan@redhat.com>
Sun, 4 Dec 2016 16:15:08 +0000 (00:15 +0800)
committerEryu Guan <eguan@redhat.com>
Mon, 19 Dec 2016 02:34:49 +0000 (10:34 +0800)
commit596a068bf130d5430b9078923b28ab5263e98d73
tree98e113aa087d525195e4bb5560bf74b5a2fe5747
parentc1cd6b1d57e1e47e626dd771d1697937414002ac
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>
common/rc
common/xfs
tests/btrfs/028
tests/btrfs/121
tests/btrfs/122
tests/btrfs/123
tests/btrfs/126