Commit 6abaf4fc authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

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: default avatarMichal 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent d89e62e7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -226,6 +226,10 @@ fi
export SPDK_BIN_DIR="$rootdir/build/bin"
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
if [ $SPDK_RUN_VALGRIND -eq 0 ]; then
	export valgrind=''
+10 −1
Original line number Diff line number Diff line
: ${MALLOC_BDEV_SIZE=256}
: ${MALLOC_BLOCK_SIZE=512}

source "$rootdir/test/vhost/common.sh"

# 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() {
	trap - ERR
+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/vhost/common.sh
source $rootdir/test/vfio_user/common.sh

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

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

bdfs=($(get_nvme_bdfs))
Loading