Commit 74da9043 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

test/vhost: Eliminate SPDK_ISCSI_VHOST_TEST_DIR



Use rootdir instead

Change-Id: I3b9902dba511608f59b075b1186cb73cec87e5ee
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454798


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent e422bf69
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -5,8 +5,6 @@ set -e

TEST_DIR=$(readlink -f $rootdir/..)

SPDK_VHOST_SCSI_TEST_DIR=$TEST_DIR/vhost

# SSH key file
: ${SPDK_VHOST_SSH_KEY_FILE="$(readlink -e $HOME/.ssh/spdk_vhost_id_rsa)"}
if [[ ! -r "$SPDK_VHOST_SSH_KEY_FILE" ]]; then
@@ -90,13 +88,13 @@ function get_vhost_dir()
		local vhost_num=0
	fi

	echo "$SPDK_VHOST_SCSI_TEST_DIR${vhost_num}"
	echo "$TEST_DIR/vhost${vhost_num}"
}

function spdk_vhost_list_all()
{
	shopt -s nullglob
	local vhost_list="$(echo $SPDK_VHOST_SCSI_TEST_DIR[0-9]*)"
	local vhost_list="$(echo $TEST_DIR/vhost[0-9]*)"
	shopt -u nullglob

	if [[ ! -z "$vhost_list" ]]; then
+2 −2
Original line number Diff line number Diff line
@@ -43,10 +43,10 @@ notice "Testing vhost command line arguments"
$VHOST_APP -c /path/to/non_existing_file/conf -S $testdir -e 0x0 -s 1024 -d -h --silence-noticelog

# Testing vhost create pid file option. Vhost will exit with error as invalid config path is given
if $VHOST_APP -c /path/to/non_existing_file/conf -f $SPDK_VHOST_SCSI_TEST_DIR/vhost.pid; then
if $VHOST_APP -c /path/to/non_existing_file/conf -f $TEST_DIR/vhost/vhost.pid; then
	fail "vhost started when specifying invalid config file"
fi
rm -f $SPDK_VHOST_SCSI_TEST_DIR/vhost.pid
rm -f $TEST_DIR/vhost/vhost.pid

# Testing vhost start with invalid config. Vhost will exit with error as bdev module init failed
if $VHOST_APP -c $testdir/invalid.config; then