autotest_common.sh: move to test/common

This is the first step in reorganizing the spdk test heirarchy.

Change-Id: I83467653af2da2a53251649092bed6902d6cb86e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/401707
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Seth Howell 2018-02-27 15:14:08 -07:00 committed by Jim Harris
parent d1165a6539
commit c9e5d2a6d0
48 changed files with 48 additions and 48 deletions

View File

@ -3,7 +3,7 @@
set -e
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/scripts/autotest_common.sh"
source "$rootdir/test/common/autotest_common.sh"
out=$PWD

View File

@ -3,7 +3,7 @@
set -xe
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/scripts/autotest_common.sh"
source "$rootdir/test/common/autotest_common.sh"
out=$PWD

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/scripts/autotest_common.sh"
source "$rootdir/test/common/autotest_common.sh"
source "$rootdir/test/nvmf/common.sh"
set -xe

View File

@ -19,7 +19,7 @@ run_step() {
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
DB_BENCH_DIR=/usr/src/rocksdb
DB_BENCH=$DB_BENCH_DIR/db_bench

View File

@ -10,7 +10,7 @@ set -xe
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
timing_enter blobstore
set -e

View File

@ -25,7 +25,7 @@ Every machine that runs the autotest scripts should include a file titled autoru
of the user that will run them. This file consists of several lines of the form 'variable_name=0/1'. autorun.sh sources
this file each time it is run, and determines which tests to attempt based on which variables are defined in the
configuration file. For a full list of the variable declarations available for autorun-spdk.conf, please see
`scripts/autotest_common.sh` starting at line 13.
`test/common/autotest_common.sh` starting at line 13.
## Steps for Configuring the VM
1. Download a fresh Fedora 26 image.

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
if [ ! -d /usr/local/calsoft ]; then

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
function node_login_fio_logout()

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
if [ ! -z $1 ]; then

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
timing_enter filesystem

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
function running_config() {

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
rpc_py="python $rootdir/scripts/rpc.py"

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
if [ ! $(uname -s) = Linux ]; then
exit 0

View File

@ -5,7 +5,7 @@ export INITIATOR_IP=127.0.0.1
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
timing_enter iscsi_lvol

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
rpc_py="python $rootdir/scripts/rpc.py"

View File

@ -4,7 +4,7 @@ set -e
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
source $rootdir/test/iscsi_tgt/common.sh

View File

@ -5,7 +5,7 @@ export INITIATOR_IP=127.0.0.1
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# iSCSI target configuration

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
if ! hash ceph; then

View File

@ -4,7 +4,7 @@ set -xe
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
timing_enter reset

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
timing_enter rpc_config

View File

@ -17,7 +17,7 @@ function run_fio()
fi
}
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $testdir/nbd_common.sh
function nbd_function_test() {

2
test/lib/env/env.sh vendored
View File

@ -4,7 +4,7 @@ set -e
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
timing_enter env

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
timing_enter event
$testdir/event_perf/event_perf -m 0xF -t 1

View File

@ -4,7 +4,7 @@ set -xe
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
timing_enter ioat

View File

@ -4,7 +4,7 @@ set -xe
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
function ssh_vm() {
sshpass -p "$password" ssh -o PubkeyAuthentication=no -o StrictHostKeyChecking=no -p 10022 root@localhost "$@"

View File

@ -5,7 +5,7 @@ set -e
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/common.sh
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
function get_nvme_name_from_bdf {
lsblk -d --output NAME

View File

@ -86,7 +86,7 @@ while getopts 'xh-:' optchar; do
done
shift $(( OPTIND - 1 ))
source $TEST_DIR/scripts/autotest_common.sh
source $TEST_DIR/test/common/autotest_common.sh
### Function starts vhost app
function vhost_start()

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
NULL_BDEV_SIZE=102400

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=64

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=64

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
rpc_py="python $rootdir/scripts/rpc.py"

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=64

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/scripts/common.sh
source $rootdir/test/nvmf/common.sh

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=64

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
set -e

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=64

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=128

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=128

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=64

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
if [ ! $(uname -s) = Linux ]; then
exit 0

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
RUNTIME=$1

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
rpc_py="python $rootdir/scripts/rpc.py"

View File

@ -2,7 +2,7 @@
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../../..)
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/nvmf/common.sh
MALLOC_BDEV_SIZE=128

View File

@ -4,7 +4,7 @@ BASE_DIR=$(readlink -f $(dirname $0))
[[ -z "$TEST_DIR" ]] && TEST_DIR="$(cd $BASE_DIR/../../ && pwd)"
rpc_py="$TEST_DIR/scripts/rpc.py "
source $TEST_DIR/scripts/autotest_common.sh
source $TEST_DIR/test/common/autotest_common.sh
# Prints error message and return error code, closes vhost app and remove
# pmem pool file

View File

@ -77,9 +77,9 @@ source $(readlink -f $(dirname ${BASH_SOURCE[0]}))/autotest.config
# Trace flag is optional, if it wasn't set earlier - disable it after sourcing
# autotest_common.sh
if [[ $- =~ x ]]; then
source $SPDK_BUILD_DIR/scripts/autotest_common.sh
source $SPDK_BUILD_DIR/test/common/autotest_common.sh
else
source $SPDK_BUILD_DIR/scripts/autotest_common.sh
source $SPDK_BUILD_DIR/test/common/autotest_common.sh
set +x
fi

View File

@ -126,7 +126,7 @@ vm_ssh $vm_no " cd spdk ; make clean ; ./configure --with-fio=/root/fio_src ; ma
timing_exit vm_build_spdk
vm_ssh $vm_no "/root/spdk/scripts/setup.sh"
vbdevs=$(vm_ssh $vm_no ". /root/spdk/scripts/autotest_common.sh && discover_bdevs /root/spdk \
vbdevs=$(vm_ssh $vm_no ". /root/spdk/test/common/autotest_common.sh && discover_bdevs /root/spdk \
/root/spdk/test/vhost/initiator/bdev_pci.conf")
virtio_bdevs=$(jq -r '[.[].name] | join(":")' <<< $vbdevs)
virtio_with_unmap=$(jq -r '[.[] | select(.supported_io_types.unmap==true).name]

View File

@ -30,7 +30,7 @@ while getopts 'i:m:f:' optchar; do
esac
done
source $rootdir/scripts/autotest_common.sh
source $rootdir/test/common/autotest_common.sh
if [ -z "$VM_IMG" ]; then
echo "ERROR: VM_IMG: path to qcow2 image not provided - not running"