From 74da904316e1e98e3bd24f2b3f9d713a57f9dd1c Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Fri, 10 May 2019 12:00:38 -0700 Subject: [PATCH] test/vhost: Eliminate SPDK_ISCSI_VHOST_TEST_DIR Use rootdir instead Change-Id: I3b9902dba511608f59b075b1186cb73cec87e5ee Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454798 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Shuhei Matsumoto Reviewed-by: Pawel Kaminski Reviewed-by: Jim Harris --- test/vhost/common.sh | 6 ++---- test/vhost/other/negative.sh | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) 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