test/vfio: Add override switch for selecting vfio-qemu bin

This would allow for better control through the environment which
could be used by the CI.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Iaf94c82ccd7ce6851abb1ad4b7ebf76d686e3608
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13898
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2022-08-08 11:22:51 +02:00 committed by Tomasz Zawadzki
parent d89e62e7ef
commit 6abaf4fc64
6 changed files with 15 additions and 5 deletions

View File

@ -226,6 +226,10 @@ fi
export SPDK_BIN_DIR="$rootdir/build/bin" export SPDK_BIN_DIR="$rootdir/build/bin"
export SPDK_EXAMPLE_DIR="$rootdir/build/examples" export SPDK_EXAMPLE_DIR="$rootdir/build/examples"
# for vhost, vfio-user tests
export QEMU_BIN=${QEMU_BIN:-}
export VFIO_QEMU_BIN=${VFIO_QEMU_BIN:-}
# pass our valgrind desire on to unittest.sh # pass our valgrind desire on to unittest.sh
if [ $SPDK_RUN_VALGRIND -eq 0 ]; then if [ $SPDK_RUN_VALGRIND -eq 0 ]; then
export valgrind='' export valgrind=''

View File

@ -1,8 +1,17 @@
: ${MALLOC_BDEV_SIZE=256} : ${MALLOC_BDEV_SIZE=256}
: ${MALLOC_BLOCK_SIZE=512} : ${MALLOC_BLOCK_SIZE=512}
source "$rootdir/test/vhost/common.sh"
# Verify vfio-user support of qemu. # Verify vfio-user support of qemu.
QEMU_BIN="/usr/local/qemu/vfio-user-dbfix/bin/qemu-system-x86_64" VFIO_QEMU_BIN=${VFIO_QEMU_BIN:-/usr/local/qemu/vfio-user-dbfix/bin/qemu-system-x86_64}
if [[ ! -e $VFIO_QEMU_BIN ]]; then
error "$VFIO_QEMU_BIN QEMU not found, cannot run the vfio-user tests"
return 1
fi
QEMU_BIN=$VFIO_QEMU_BIN
function clean_vfio_user() { function clean_vfio_user() {
trap - ERR trap - ERR

View File

@ -2,7 +2,6 @@
testdir=$(readlink -f $(dirname $0)) testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..) rootdir=$(readlink -f $testdir/../..)
source $rootdir/test/common/autotest_common.sh source $rootdir/test/common/autotest_common.sh
source $rootdir/test/vhost/common.sh
source $rootdir/test/vfio_user/common.sh source $rootdir/test/vfio_user/common.sh
echo "Running SPDK vfio-user fio autotest..." echo "Running SPDK vfio-user fio autotest..."

View File

@ -3,7 +3,6 @@
testdir=$(readlink -f $(dirname $0)) testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..) rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh source $rootdir/test/common/autotest_common.sh
source $rootdir/test/vhost/common.sh
source $rootdir/test/vfio_user/common.sh source $rootdir/test/vfio_user/common.sh
rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir 0)/rpc.sock" rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir 0)/rpc.sock"

View File

@ -2,7 +2,6 @@
testdir=$(readlink -f $(dirname $0)) testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..) rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh source $rootdir/test/common/autotest_common.sh
source $rootdir/test/vhost/common.sh
source $rootdir/test/vfio_user/common.sh source $rootdir/test/vfio_user/common.sh
bdfs=($(get_nvme_bdfs)) bdfs=($(get_nvme_bdfs))

View File

@ -1,6 +1,6 @@
: ${SPDK_VHOST_VERBOSE=false} : ${SPDK_VHOST_VERBOSE=false}
: ${VHOST_DIR="$HOME/vhost_test"} : ${VHOST_DIR="$HOME/vhost_test"}
: ${QEMU_BIN="qemu-system-x86_64"} : ${QEMU_BIN:="qemu-system-x86_64"}
: ${QEMU_IMG_BIN="qemu-img"} : ${QEMU_IMG_BIN="qemu-img"}
TEST_DIR=$(readlink -f $rootdir/..) TEST_DIR=$(readlink -f $rootdir/..)