diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 07d4e410b..b4b44ae2f 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -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 diff --git a/test/vhost/other/negative.sh b/test/vhost/other/negative.sh index e4e23c438..a7f12f138 100755 --- a/test/vhost/other/negative.sh +++ b/test/vhost/other/negative.sh @@ -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