check the disk size is enougth for test, should move '_require_fs_space' after mounted. fix error: btrfs/012 [not run] This test requires at least 0GB free on /fs/scratch to run Signed-off-by: Zhu Yifei <yifeix.zhu@xxxxxxxxx> --- tests/btrfs/012 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/btrfs/012 b/tests/btrfs/012 index 46341e9..8b11cf9 100755 --- a/tests/btrfs/012 +++ b/tests/btrfs/012 @@ -29,8 +29,6 @@ _require_command "$BTRFS_CONVERT_PROG" btrfs-convert _require_command "$MKFS_EXT4_PROG" mkfs.ext4 _require_command "$E2FSCK_PROG" e2fsck -_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}') - BLOCK_SIZE=`_get_block_size $TEST_DIR` # Create & populate an ext4 filesystem @@ -39,6 +37,8 @@ $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}') + cp -aR /lib/modules/`uname -r`/ $SCRATCH_MNT _scratch_unmount -- 1.8.3.1