test/vhost: Don't fetch .qcow2 image needed for tests
Simply fail. It's expected to have this image already installed on
the system.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6375 (master)
(cherry picked from commit ee191fa807
)
Change-Id: Ie7bbde84fe633c8b5a4d41bd6dcbee66d6f4a0c5
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9914
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
18936662df
commit
1ea7b29ff8
@ -8,7 +8,7 @@ VM_DIR=$VHOST_DIR/vms
|
||||
TARGET_DIR=$VHOST_DIR/vhost
|
||||
VM_PASSWORD="root"
|
||||
|
||||
VM_IMAGE=$HOME/spdk_test_image.qcow2
|
||||
VM_IMAGE=${VM_IMAGE:-"$HOME/spdk_test_image.qcow2"}
|
||||
|
||||
if ! hash $QEMU_IMG_BIN $QEMU_BIN; then
|
||||
error 'QEMU is not installed on this system. Unable to run vhost tests.'
|
||||
@ -27,22 +27,17 @@ source $rootdir/test/vhost/common/autotest.config
|
||||
function vhosttestinit() {
|
||||
if [ "$TEST_MODE" == "iso" ]; then
|
||||
$rootdir/scripts/setup.sh
|
||||
fi
|
||||
|
||||
# Look for the VM image
|
||||
if [[ ! -f $VM_IMAGE ]]; then
|
||||
echo "VM image not found at $VM_IMAGE"
|
||||
echo "Download to $HOME? [yn]"
|
||||
read -r download
|
||||
if [ "$download" = "y" ]; then
|
||||
curl https://ci.spdk.io/download/test_resources/vhost_vm_image.tar.gz | tar xz -C $HOME
|
||||
fi
|
||||
fi
|
||||
if [[ -e $VM_IMAGE.gz ]]; then
|
||||
gzip -dc "$VM_IMAGE.gz" > "$VM_IMAGE"
|
||||
fi
|
||||
|
||||
# Look for the VM image
|
||||
if [[ "$1" != "--no_vm" ]] && [[ ! -f $VM_IMAGE ]]; then
|
||||
error "VM image not found at $VM_IMAGE"
|
||||
exit 1
|
||||
if [[ ! -f $VM_IMAGE ]]; then
|
||||
[[ $1 != "--no_vm" ]] || return 0
|
||||
echo "$VM_IMAGE is missing" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -38,13 +38,7 @@ if [[ $(uname -s) != Linux ]]; then
|
||||
fi
|
||||
|
||||
: ${FIO_BIN="$DEFAULT_FIO_BIN"}
|
||||
|
||||
if [[ ! -r "${VM_IMAGE}" ]]; then
|
||||
echo ""
|
||||
echo "ERROR: VM image '${VM_IMAGE}' does not exist."
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
vhosttestinit
|
||||
|
||||
DISKS_NUMBER=$(lspci -mm -n | grep 0108 | tr -d '"' | awk -F " " '{print "0000:"$1}' | wc -l)
|
||||
|
||||
|
@ -17,13 +17,7 @@ DEFAULT_FIO_BIN="/home/sys_sgsw/fio_ubuntu"
|
||||
CENTOS_FIO_BIN="/home/sys_sgsw/fio_ubuntu_bak"
|
||||
|
||||
: ${FIO_BIN="$DEFAULT_FIO_BIN"}
|
||||
|
||||
if [[ ! -r "${VM_IMAGE}" ]]; then
|
||||
echo ""
|
||||
echo "ERROR: VM image '${VM_IMAGE}' does not exist."
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
vhosttestinit
|
||||
|
||||
DISKS_NUMBER=$(lspci -mm -n | grep 0108 | tr -d '"' | awk -F " " '{print "0000:"$1}' | wc -l)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user