[PATCH v1 xfstests-dev] tests/btrfs/012: check size after mounted

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



move '_require_fs_space'  after mounted.

==before patch==
btrfs/012       [not run] This test requires at least 0GB free on /fs/scratch to run

==after patch==
btrfs/012 189s ...  194s
Ran: btrfs/012
Passed all 1 tests

Signed-off-by: Zhu Yifei <yifeix.zhu@xxxxxxxxx>
---
 tests/btrfs/012 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/btrfs/012 b/tests/btrfs/012
index 3040a655..db3beb00 100755
--- a/tests/btrfs/012
+++ b/tests/btrfs/012
@@ -28,10 +28,6 @@ _require_scratch_nocheck
 _require_command "$BTRFS_CONVERT_PROG" btrfs-convert
 _require_command "$MKFS_EXT4_PROG" mkfs.ext4
 _require_command "$E2FSCK_PROG" e2fsck
-# ext4 does not support zoned block device
-_require_non_zoned_device "${SCRATCH_DEV}"
-
-_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}')
 
 BLOCK_SIZE=`_get_block_size $TEST_DIR`
 
@@ -41,6 +37,11 @@ $MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \
 # Manual mount so we don't use -t btrfs or selinux context
 mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
 
+_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}')
+
+# ext4 does not support zoned block device
+_require_non_zoned_device "${SCRATCH_DEV}"
+
 cp -aR /lib/modules/`uname -r`/ $SCRATCH_MNT
 _scratch_unmount
 
-- 
2.20.1




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux