mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ _require_scratch
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
_scratch_mkfs
|
||||
_scratch_mkfs >/dev/null
|
||||
_scratch_mount
|
||||
_run_btrfs_util_prog quota enable $SCRATCH_MNT
|
||||
# The qgroup '1/10' does not exist and should be silently ignored
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ rm -f $seqres.full
|
||||
|
||||
# Force a small leaf size to make it easier to blow out our root
|
||||
# subvolume tree
|
||||
_scratch_mkfs "--nodesize 16384"
|
||||
_scratch_mkfs "--nodesize 16384" >/dev/null
|
||||
_scratch_mount
|
||||
_run_btrfs_util_prog quota enable $SCRATCH_MNT
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ _supported_os Linux
|
||||
_require_scratch
|
||||
_require_btrfs_qgroup_report
|
||||
|
||||
_scratch_mkfs
|
||||
_scratch_mkfs >/dev/null
|
||||
# Need to use inline extents to fill metadata rapidly
|
||||
_scratch_mount "-o max_inline=2048"
|
||||
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ _supported_os Linux
|
||||
_require_scratch
|
||||
_require_btrfs_qgroup_report
|
||||
|
||||
_scratch_mkfs
|
||||
_scratch_mkfs >/dev/null
|
||||
# Use enospc_debug mount option to trigger restrict space info check
|
||||
_scratch_mount "-o enospc_debug"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user