diff options
author | Zhu Yifei <yifeix.zhu@intel.com> | 2021-10-25 11:22:56 +0800 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2021-10-31 21:57:21 +0800 |
commit | 7ca10f2b05e57d9816af51da04c336284691ae79 (patch) | |
tree | a5160a0e34c6de93eddffca0923e5e768bd97a6a | |
parent | 6ebdbddac7a3d5893e41774a0cbf8f72c524f944 (diff) | |
download | xfstests-dev-7ca10f2b05e57d9816af51da04c336284691ae79.tar.gz |
btrfs/012: check size after mounted
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@intel.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-x | tests/btrfs/012 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/btrfs/012 b/tests/btrfs/012 index 3040a65509..29552b14f1 100755 --- a/tests/btrfs/012 +++ b/tests/btrfs/012 @@ -31,8 +31,6 @@ _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` # Create & populate an ext4 filesystem @@ -41,6 +39,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 |