test/vhost: Commonize some of the environment

Also, remove the unecessary FIXME.

Signed-off-by: Michal 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: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Michal Berger 2021-02-26 12:22:24 +01:00 committed by Jim Harris
parent 81a8bc670c
commit 9c3ba11a29
4 changed files with 4 additions and 11 deletions

View File

@ -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.'

View File

@ -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

View File

@ -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...'

View File

@ -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