generic/064: access SCRATCH_MNT after _scratch_mount
authorAmir Goldstein <amir73il@gmail.com>
Tue, 28 Feb 2017 12:18:33 +0000 (14:18 +0200)
committerEryu Guan <eguan@redhat.com>
Wed, 1 Mar 2017 10:35:23 +0000 (18:35 +0800)
Test is calling _get_block_size $SCRATCH_MNT before
_scratch_mount. This results in block size of the
wrong fs and a failure with overlay base fs setup.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/064

index 8cd31b3c7a60d3db2986e7154114bd4ab874f4f1..156485eef3a9f2e752921f6541d353b2737e01d9 100755 (executable)
@@ -46,14 +46,16 @@ _require_scratch
 _require_xfs_io_command "fiemap"
 _require_xfs_io_command "finsert"
 _require_xfs_io_command "fcollapse"
-src=$SCRATCH_MNT/testfile
-dest=$SCRATCH_MNT/testfile.dest
-BLOCKS=100
-BSIZE=`_get_block_size $SCRATCH_MNT`
+
 rm -f $seqres.full
 
 _scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount || _fail "mount failed"
+
+src=$SCRATCH_MNT/testfile
+dest=$SCRATCH_MNT/testfile.dest
+BLOCKS=100
+BSIZE=`_get_block_size $SCRATCH_MNT`
 length=$(($BLOCKS * $BSIZE))
 
 # Write file