Commit 9c3ba11a authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

test/vhost: Commonize some of the environment



Also, remove the unecessary FIXME.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: I3feda936cff62d79e921247dd40613c389ac3a3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6586


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 81a8bc67
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -9,6 +9,10 @@ TARGET_DIR=$VHOST_DIR/vhost
VM_PASSWORD="root"

VM_IMAGE=${VM_IMAGE:-"$DEPENDENCY_DIR/spdk_test_image.qcow2"}
DEFAULT_FIO_BIN=${DEFAULT_FIO_BIN:-"$DEPENDENCY_DIR/fio"}
FIO_BIN=${FIO_BIN:-"$DEFAULT_FIO_BIN"}

WORKDIR=$(readlink -f "$(dirname "$0")")

if ! hash $QEMU_IMG_BIN $QEMU_BIN; then
	error 'QEMU is not installed on this system. Unable to run vhost tests.'
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ vhosttestinit

spdk_mask=$vhost_0_reactor_mask
if $distribute_cores; then
	# FIXME: this need to be handled entirely in common.sh
	source $testdir/autotest.config
	# Adjust the mask so vhost runs on separate cpus than qemu instances.
	# We know that .config sets qemus to run on single cpu so simply take
+0 −5
Original line number Diff line number Diff line
@@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/vhost/common.sh

DEFAULT_FIO_BIN="$DEPENDENCY_DIR/fio"

case $1 in
	-h | --help)
		echo "usage: $(basename $0) TEST_TYPE"
@@ -35,11 +33,8 @@ if [[ $(uname -s) != Linux ]]; then
	exit 0
fi

: ${FIO_BIN="$DEFAULT_FIO_BIN"}
vhosttestinit

WORKDIR=$(readlink -f $(dirname $0))

case $1 in
	-hp | --hotplug)
		echo 'Running hotplug tests suite...'
+0 −5
Original line number Diff line number Diff line
@@ -12,13 +12,8 @@ if [[ $(uname -s) != Linux ]]; then
	exit 0
fi

DEFAULT_FIO_BIN="$DEPENDENCY_DIR/fio"

: ${FIO_BIN="$DEFAULT_FIO_BIN"}
vhosttestinit

WORKDIR=$(readlink -f $(dirname $0))

run_test "vhost_negative" $WORKDIR/other/negative.sh

run_test "vhost_boot" $WORKDIR/vhost_boot/vhost_boot.sh --vm_image=$VM_IMAGE