fstests: fix broken _require_scratch usage

_require_scratch doesn't actually format the scratch device with
anything, which means that tests are required to format them before
using them.  Fix tests that don't do this correctly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Darrick J. Wong
2019-03-19 17:46:01 -07:00
committed by Eryu Guan
parent c2cda723f6
commit 8309b39a8a
9 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ _supported_os Linux
# too much hassle to get output matching with quotas turned on
# so don't run it
#
_scratch_unmount 2>/dev/null
_scratch_mkfs_xfs >> $seqres.full
_scratch_mount
$here/src/feature -U $SCRATCH_DEV && \
_notrun "UQuota enabled, test needs controlled xfsdump output"
+1
View File
@@ -61,6 +61,7 @@ test_accounting()
}
export MOUNT_OPTIONS="-opquota"
_scratch_mkfs_xfs >> $seqres.full
_qmount
_require_prjquota $SCRATCH_DEV
+1 -1
View File
@@ -75,7 +75,7 @@ allocate()
}
# real QA test starts here
_scratch_unmount 2>/dev/null
_scratch_mkfs_xfs >> $seqres.full
_scratch_mount
rm -f $seqres.full
+3 -1
View File
@@ -32,6 +32,9 @@ _supported_os Linux
# real QA test starts here
rm -f $seqres.full
_require_scratch
_scratch_mkfs_xfs >/dev/null 2>&1
# For this test we use block size = 1/8 page size
pgsize=`$here/src/feature -s`
blksize=`expr $pgsize / 8`
@@ -70,7 +73,6 @@ _filter_od()
sed -e "s/^[0-9A-Fa-f ]\{7,8\}//"
}
_require_scratch
unset MKFS_OPTIONS
unset XFS_MKFS_OPTIONS
+2
View File
@@ -47,6 +47,8 @@ _supported_os Linux
_require_quota
_require_scratch
_scratch_mkfs >> $seqres.full 2>&1
# Just use the current mount table as an example mtab file. Odds
# are good there's nothing wrong with it.
_setup_my_mtab() {
+1
View File
@@ -50,6 +50,7 @@ COPY_FILE="${TEST_DIR}/${seq}_copyfile"
# Test dump a mounted device
# xfs_metadump should refuse to dump a mounted device
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
_scratch_metadump $METADUMP_FILE 2>&1 | filter_mounted
_scratch_unmount