vhost: Move test/vhost/common/common.sh up one directory

This matches the pattern used in other tests.

Many of the tests use a COMMON_DIR defined up top.
Instead of changing where this points, because it's used
for multiple things, just change the places where it
is used to source common.sh. This is lower risk for now
until these are cleaned up later.

Change-Id: Ib38ea9fdc94118c6c406f86177bab21c4e1c98b4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453440
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This commit is contained in:
Ben Walker 2019-05-01 15:13:48 -07:00 committed by Darek Stojaczyk
parent d83a3489cc
commit 3d11b2fedf
18 changed files with 20 additions and 20 deletions

View File

@ -6,10 +6,10 @@ set -e
BASE_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
# Default running dir -> spdk/..
[[ -z "$TEST_DIR" ]] && TEST_DIR=$BASE_DIR/../../../../
[[ -z "$TEST_DIR" ]] && TEST_DIR=$BASE_DIR/../../../
TEST_DIR="$(mkdir -p $TEST_DIR && cd $TEST_DIR && echo $PWD)"
SPDK_BUILD_DIR=$BASE_DIR/../../../
SPDK_BUILD_DIR=$BASE_DIR/../../
SPDK_VHOST_SCSI_TEST_DIR=$TEST_DIR/vhost
@ -72,7 +72,7 @@ mkdir -p $TEST_DIR
#
# Source config describing QEMU and VHOST cores and NUMA
#
source $(readlink -f $(dirname ${BASH_SOURCE[0]}))/autotest.config
source $BASE_DIR/common/autotest.config
# Trace flag is optional, if it wasn't set earlier - disable it after sourcing
# autotest_common.sh

View File

@ -45,7 +45,7 @@ fi
notice "$0"
notice ""
. $COMMON_DIR/common.sh
. $COMMON_DIR/../common.sh
# Starting vhost with valid options
spdk_vhost_run $vhost_num --conf-path=$CONF_DIR

View File

@ -33,7 +33,7 @@ while getopts 'xah-:' optchar; do
esac
done
. $COMMON_DIR/common.sh
. $COMMON_DIR/../common.sh
if [[ $EUID -ne 0 ]]; then
fail "Go away user come back as root"

View File

@ -71,7 +71,7 @@ for param in "$@"; do
setup_params+=( "$param" )
done
. $COMMON_DIR/common.sh
. $COMMON_DIR/../common.sh
vm_setup ${setup_params[@]}

View File

@ -36,7 +36,7 @@ while getopts "$optspec" optchar; do
esac
done
. $COMMON_DIR/common.sh
. $COMMON_DIR/../common.sh
if $do_kill && [[ $EUID -ne 0 ]]; then
echo "Go away user come back as root"

View File

@ -33,7 +33,7 @@ while getopts 'xwh-:' optchar; do
esac
done
. $COMMON_DIR/common.sh
. $COMMON_DIR/../common.sh
shift $((OPTIND-1))
vm_num="$1"

View File

@ -71,7 +71,7 @@ if [[ ! -r "$fio_job" ]]; then
fail "no fio job file specified"
fi
. $COMMON_DIR/common.sh
. $COMMON_DIR/../common.sh
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR

View File

@ -59,7 +59,7 @@ shift $(( OPTIND - 1 ))
fio_job=$HOTPLUG_DIR/fio_jobs/default_integrity.job
tmp_attach_job=$HOTPLUG_DIR/fio_jobs/fio_attach.job.tmp
tmp_detach_job=$HOTPLUG_DIR/fio_jobs/fio_detach.job.tmp
. $HOTPLUG_DIR/../common/common.sh
. $HOTPLUG_DIR/../common.sh
rpc_py="$SPDK_BUILD_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"

View File

@ -39,7 +39,7 @@ while getopts 'h-:' optchar; do
esac
done
source $COMMON_DIR/common.sh
source $COMMON_DIR/../common.sh
source $INITIATOR_DIR/autotest.config
PLUGIN_DIR=$ROOT_DIR/examples/bdev/fio_plugin
RPC_PY="$ROOT_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"

View File

@ -47,7 +47,7 @@ while getopts 'xh-:' optchar; do
esac
done
. $(readlink -e "$(dirname $0)/../common/common.sh") || exit 1
. $(readlink -e "$(dirname $0)/../common.sh") || exit 1
rpc_py="$SPDK_BUILD_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
trap 'error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR

View File

@ -8,7 +8,7 @@ LVOL_TEST_DIR=$(readlink -f $(dirname $0))
[[ -z "$TEST_DIR" ]] && TEST_DIR="$(cd $LVOL_TEST_DIR/../../../../ && pwd)"
[[ -z "$COMMON_DIR" ]] && COMMON_DIR="$(cd $LVOL_TEST_DIR/../common && pwd)"
. $COMMON_DIR/common.sh
. $COMMON_DIR/../common.sh
rpc_py="$SPDK_BUILD_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
vm_count=1

View File

@ -55,7 +55,7 @@ for param in "$@"; do
esac
done
. $(readlink -e "$(dirname $0)/../common/common.sh") || exit 1
. $(readlink -e "$(dirname $0)/../common.sh") || exit 1
MIGRATION_DIR=$(readlink -f $(dirname $0))
[[ ! -z "$test_cases" ]] || fail "Need '--test-cases=' parameter"

View File

@ -34,7 +34,7 @@ while getopts 'xh-:' optchar; do
done
. $COMMON_DIR/common.sh
. $COMMON_DIR/../common.sh
trap error_exit ERR

View File

@ -136,7 +136,7 @@ while getopts 'xh-:' optchar; do
esac
done
. $(readlink -e "$(dirname $0)/../common/common.sh") || exit 1
. $(readlink -e "$(dirname $0)/../common.sh") || exit 1
. $(readlink -e "$(dirname $0)/../../../scripts/common.sh") || exit 1
BASE_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
COMMON_DIR="$(cd $(readlink -f $(dirname $0))/../common && pwd)"

View File

@ -4,7 +4,7 @@ set -e
READONLY_BASE_DIR=$(readlink -f $(dirname $0))
[[ -z "$TEST_DIR" ]] && TEST_DIR="$(cd $READONLY_BASE_DIR/../../../../ && pwd)"
[[ -z "$COMMON_DIR" ]] && COMMON_DIR="$(cd $READONLY_BASE_DIR/../common && pwd)"
source $COMMON_DIR/common.sh
source $COMMON_DIR/../common.sh
rpc_py="$READONLY_BASE_DIR/../../../scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"

View File

@ -4,7 +4,7 @@ set -e
SHARED_DIR=$(readlink -f $(dirname $0))
[[ -z "$COMMON_DIR" ]] && COMMON_DIR="$(cd $SHARED_DIR/../common && pwd)"
ROOT_DIR=$(readlink -f $SHARED_DIR/../../..)
source $COMMON_DIR/common.sh
source $COMMON_DIR/../common.sh
PLUGIN_DIR=$ROOT_DIR/examples/bdev/fio_plugin
FIO_PATH="/usr/src/fio"
rpc_py="$SPDK_BUILD_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"

View File

@ -3,7 +3,7 @@ set -xe
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
. $testdir/../common/common.sh
. $testdir/../common.sh
. $rootdir/test/bdev/nbd_common.sh
rpc_py="$SPDK_BUILD_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"

View File

@ -4,7 +4,7 @@ set -e
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $(dirname $0))/../../..
vhost_common_dir=$(readlink -e "$(dirname $0)/../common")
source "$vhost_common_dir/common.sh"
source "$vhost_common_dir/../common.sh"
rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
ctrl_type="spdk_vhost_scsi"