From: Zhu Yifei Date: Mon, 25 Oct 2021 03:22:56 +0000 (+0800) Subject: btrfs/012: check size after mounted X-Git-Tag: v2022.05.01~198 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7ca10f2b05e57d9816af51da04c336284691ae79;p=xfstests-dev.git 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 Reviewed-by: Filipe Manana Signed-off-by: Eryu Guan --- diff --git a/tests/btrfs/012 b/tests/btrfs/012 index 3040a655..29552b14 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