# them explicity after test.
_require_scratch_nocheck
_require_scratch_overlay_features index redirect_dir metacopy
+_require_xfs_io_command "falloc"
# remove all files from previous tests
_scratch_mkfs
{
local target=$1 expected_size=$2 actual_size
- actual_size=$(stat -c "%s" $target)
+ actual_size=$(_get_filesize $target)
[ "$actual_size" == "$expected_size" ] || echo "Expected file size $expected_size but actual size is $actual_size"
}
# Trigger data copy up and check absence of metacopy xattr.
mount_overlay $_lowerdir
- $XFS_IO_PROG -c "open -a $SCRATCH_MNT/$_target"
+ $XFS_IO_PROG -c "falloc 0 1" $SCRATCH_MNT/$_target >> $seqres.full
echo "check properties of data copied up file"
check_file_size_contents $SCRATCH_MNT/$_target $_size "$_data"
umount_overlay