test/vhost: Eliminate SPDK_ISCSI_VHOST_TEST_DIR
Use rootdir instead Change-Id: I3b9902dba511608f59b075b1186cb73cec87e5ee Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454798 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
e422bf69bb
commit
74da904316
@ -5,8 +5,6 @@ set -e
|
|||||||
|
|
||||||
TEST_DIR=$(readlink -f $rootdir/..)
|
TEST_DIR=$(readlink -f $rootdir/..)
|
||||||
|
|
||||||
SPDK_VHOST_SCSI_TEST_DIR=$TEST_DIR/vhost
|
|
||||||
|
|
||||||
# SSH key file
|
# SSH key file
|
||||||
: ${SPDK_VHOST_SSH_KEY_FILE="$(readlink -e $HOME/.ssh/spdk_vhost_id_rsa)"}
|
: ${SPDK_VHOST_SSH_KEY_FILE="$(readlink -e $HOME/.ssh/spdk_vhost_id_rsa)"}
|
||||||
if [[ ! -r "$SPDK_VHOST_SSH_KEY_FILE" ]]; then
|
if [[ ! -r "$SPDK_VHOST_SSH_KEY_FILE" ]]; then
|
||||||
@ -90,13 +88,13 @@ function get_vhost_dir()
|
|||||||
local vhost_num=0
|
local vhost_num=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$SPDK_VHOST_SCSI_TEST_DIR${vhost_num}"
|
echo "$TEST_DIR/vhost${vhost_num}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function spdk_vhost_list_all()
|
function spdk_vhost_list_all()
|
||||||
{
|
{
|
||||||
shopt -s nullglob
|
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
|
shopt -u nullglob
|
||||||
|
|
||||||
if [[ ! -z "$vhost_list" ]]; then
|
if [[ ! -z "$vhost_list" ]]; then
|
||||||
|
@ -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
|
$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
|
# 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"
|
fail "vhost started when specifying invalid config file"
|
||||||
fi
|
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
|
# Testing vhost start with invalid config. Vhost will exit with error as bdev module init failed
|
||||||
if $VHOST_APP -c $testdir/invalid.config; then
|
if $VHOST_APP -c $testdir/invalid.config; then
|
||||||
|
Loading…
Reference in New Issue
Block a user