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

test/common: Don't use $HOME as base for $DEPENDENCY_DIR



This is a source of problems especially in context of sudo so replace
it with a dedicated path instead.

Also, simplify fio selection - these tests should not depend, by
default, on some specific binary. Instead, always fallback to using
what given VM image provides.

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


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 2222a53d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ export LSAN_OPTIONS=suppressions="$asan_suppression_file"
export DEFAULT_RPC_ADDR="/var/tmp/spdk.sock"

if [ -z "${DEPENDENCY_DIR:-}" ]; then
	export DEPENDENCY_DIR=$HOME/spdk_dependencies
	export DEPENDENCY_DIR=/var/spdk/dependencies
else
	export DEPENDENCY_DIR
fi
+0 −5
Original line number Diff line number Diff line
@@ -8,11 +8,6 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh

if [ -z "${DEPENDENCY_DIR}" ]; then
	echo DEPENDENCY_DIR not defined!
	exit 1
fi

MALLOC_BDEV_SIZE=64
MALLOC_BLOCK_SIZE=512

+4 −5
Original line number Diff line number Diff line
@@ -13,9 +13,8 @@ VM_DIR=$VHOST_DIR/vms
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"}
VM_IMAGE=${VM_IMAGE:-"$DEPENDENCY_DIR/vhost/spdk_test_image.qcow2"}
FIO_BIN=${FIO_BIN:-}

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

@@ -1144,11 +1143,11 @@ function run_fio() {

		if ! $run_server_mode; then
			if [[ -n "$fio_bin" ]]; then
				if ! $run_plugin_mode; then
				if ! $run_plugin_mode && [[ -e $fio_bin ]]; then
					vm_exec $vm_num 'cat > /root/fio; chmod +x /root/fio' < $fio_bin
					vm_fio_bin="/root/fio"
				else
					vm_fio_bin="/usr/src/fio/fio"
					vm_fio_bin=$fio_bin
				fi
			fi

+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ case $1 in
		echo "  -h |--help                           prints this message"
		echo ""
		echo "Environment:"
		echo "  VM_IMAGE        path to QCOW2 VM image used during test (default: $DEPENDENCY_DIR/spdk_test_image.qcow2)"
		echo "  VM_IMAGE        path to QCOW2 VM image used during test (default: $DEPENDENCY_DIR/vhost/spdk_test_image.qcow2)"
		echo ""
		echo "Tests are performed only on Linux machine. For other OS no action is performed."
		echo ""
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ source $rootdir/test/vhost/common.sh
# and OS Version: 6.3.9600 N/A Build 9600
# In order to run this test with windows vm
# windows virtio scsi driver must be installed
WINDOWS_IMG="$DEPENDENCY_DIR/windows_scsi_compliance/windows_vm_image.qcow2"
WINDOWS_IMG="$DEPENDENCY_DIR/storage/windows_scsi_compliance/windows_vm_image.qcow2"
aio_file="$SPDK_TEST_STORAGE/aio_disk"
ssh_pass=""
vm_num=1