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:
parent
d1165a6539
commit
c9e5d2a6d0
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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() {
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
2
test/lib/env/env.sh
vendored
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 "$@"
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user