diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 68303726d..3c5c600f5 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -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.' diff --git a/test/vhost/lvol/lvol_test.sh b/test/vhost/lvol/lvol_test.sh index 6920eff87..fda77acc7 100755 --- a/test/vhost/lvol/lvol_test.sh +++ b/test/vhost/lvol/lvol_test.sh @@ -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 diff --git a/test/vhost/manual.sh b/test/vhost/manual.sh index 5cdb8a453..1d6da4732 100755 --- a/test/vhost/manual.sh +++ b/test/vhost/manual.sh @@ -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...' diff --git a/test/vhost/vhost.sh b/test/vhost/vhost.sh index 616d3224a..4d6deabbc 100755 --- a/test/vhost/vhost.sh +++ b/test/vhost/vhost.sh @@ -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