test/vhost: reduce size of created raw disk file

Reducing as a preparation for running vhost iniator tests
on Vagrant VMs as they do not have sufficient space for
this kind of test.

Change-Id: I20a8c3c4b1b547599be5c10e1935213f512e4c21
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/427020
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Karol Latecki 2018-09-27 09:12:45 +02:00 committed by Ben Walker
parent 2aaaff5ee8
commit 0f25ee9750

View File

@ -706,8 +706,8 @@ function vm_setup()
local raw_disk=$(readlink -f $disk)
fi
# Create disk file if it not exist or it is smaller than 10G
if ( [[ -f $raw_disk ]] && [[ $(stat --printf="%s" $raw_disk) -lt $((1024 * 1024 * 1024 * 10)) ]] ) || \
# Create disk file if it not exist or it is smaller than 1G
if ( [[ -f $raw_disk ]] && [[ $(stat --printf="%s" $raw_disk) -lt $((1024 * 1024 * 1024)) ]] ) || \
[[ ! -e $raw_disk ]]; then
if [[ $raw_disk =~ /dev/.* ]]; then
error \
@ -717,7 +717,7 @@ function vm_setup()
fi
notice "Creating Virtio disc $raw_disk"
dd if=/dev/zero of=$raw_disk bs=1024k count=10240
dd if=/dev/zero of=$raw_disk bs=1024k count=1024
else
notice "Using existing image $raw_disk"
fi