test/iscsi: move all iSCSI target configuration common
This moves all iSCSI configuration to common.sh that should be sourced in each test file. When particular tests requires different configuration, it can overwrite those values. (See ip_migration.sh) Change-Id: Ia5f684142fb910184809ee7efe74b5a51063b374 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/405547 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
b4db5cf9c7
commit
016cfd3b69
@ -11,11 +11,6 @@ fi
|
||||
|
||||
timing_enter calsoft
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
MALLOC_BDEV_SIZE=64
|
||||
MALLOC_BLOCK_SIZE=512
|
||||
|
||||
|
@ -1,22 +1,9 @@
|
||||
if [ -z $TARGET_IP ]; then
|
||||
TARGET_IP=127.0.0.1
|
||||
echo "TARGET_IP not defined in environment; defaulting to $TARGET_IP"
|
||||
fi
|
||||
|
||||
if [ -z $INITIATOR_IP ]; then
|
||||
INITIATOR_IP=127.0.0.1
|
||||
echo "INITIATOR_IP not defined in environment; defaulting to $INITIATOR_IP"
|
||||
fi
|
||||
|
||||
if [ -z $ISCSI_PORT ]; then
|
||||
ISCSI_PORT=3260
|
||||
echo "ISCSI_PORT not defined in environment; defaulting to $ISCSI_PORT"
|
||||
fi
|
||||
|
||||
if [ -z "$ISCSI_APP" ]; then
|
||||
ISCSI_APP=./app/iscsi_tgt/iscsi_tgt
|
||||
fi
|
||||
|
||||
if [ -z "$ISCSI_TEST_CORE_MASK" ]; then
|
||||
ISCSI_TEST_CORE_MASK=0xFF
|
||||
fi
|
||||
# iSCSI target configuration
|
||||
TARGET_IP=127.0.0.1
|
||||
INITIATOR_IP=127.0.0.1
|
||||
ISCSI_PORT=3260
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
ISCSI_APP="./app/iscsi_tgt/iscsi_tgt -i 0"
|
||||
ISCSI_TEST_CORE_MASK=0xFF
|
||||
|
@ -59,11 +59,6 @@ function iscsi_header_data_digest_test()
|
||||
|
||||
timing_enter digests
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
MALLOC_BDEV_SIZE=64
|
||||
MALLOC_BLOCK_SIZE=512
|
||||
|
||||
|
@ -14,11 +14,6 @@ timing_enter ext4test
|
||||
cp $testdir/iscsi.conf.in $testdir/iscsi.conf
|
||||
$rootdir/scripts/gen_nvme.sh >> $testdir/iscsi.conf
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
|
||||
|
@ -8,11 +8,6 @@ source $rootdir/scripts/common.sh
|
||||
|
||||
timing_enter filesystem
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
# Remove lvol bdevs and stores.
|
||||
|
@ -46,11 +46,6 @@ timing_enter fio
|
||||
|
||||
cp $testdir/iscsi.conf.in $testdir/iscsi.conf
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
MALLOC_BDEV_SIZE=64
|
||||
MALLOC_BLOCK_SIZE=4096
|
||||
|
||||
|
@ -7,11 +7,6 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
|
||||
timing_enter initiator
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
MALLOC_BDEV_SIZE=64
|
||||
MALLOC_BLOCK_SIZE=512
|
||||
|
||||
|
@ -8,7 +8,6 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
fio_py="python $rootdir/scripts/fio.py"
|
||||
|
||||
ISCSI_PORT=3260
|
||||
NETMASK=127.0.0.0/24
|
||||
MIGRATION_ADDRESS=127.0.0.2
|
||||
|
||||
@ -35,7 +34,6 @@ function rpc_add_target_node() {
|
||||
|
||||
timing_enter ip_migration
|
||||
|
||||
# iSCSI target configuration
|
||||
|
||||
echo "Running ip migration tests"
|
||||
for ((i=0; i<2; i++))
|
||||
|
@ -7,9 +7,6 @@ if [ ! $(uname -s) = Linux ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export TARGET_IP=127.0.0.1
|
||||
export INITIATOR_IP=127.0.0.1
|
||||
|
||||
source $rootdir/test/iscsi_tgt/common.sh
|
||||
|
||||
timing_enter iscsi_tgt
|
||||
@ -24,8 +21,6 @@ timing_enter iscsi_tgt
|
||||
start_stub "-s 2048 -i 0 -m $ISCSI_TEST_CORE_MASK"
|
||||
trap "kill_stub; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
export ISCSI_APP="./app/iscsi_tgt/iscsi_tgt -i 0"
|
||||
|
||||
run_test ./test/iscsi_tgt/calsoft/calsoft.sh
|
||||
run_test ./test/iscsi_tgt/filesystem/filesystem.sh
|
||||
run_test ./test/iscsi_tgt/reset/reset.sh
|
||||
|
@ -1,8 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export TARGET_IP=127.0.0.1
|
||||
export INITIATOR_IP=127.0.0.1
|
||||
|
||||
testdir=$(readlink -f $(dirname $0))
|
||||
rootdir=$(readlink -f $testdir/../../..)
|
||||
source $rootdir/test/common/autotest_common.sh
|
||||
@ -10,11 +7,6 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
|
||||
timing_enter iscsi_lvol
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
MALLOC_BDEV_SIZE=128
|
||||
MALLOC_BLOCK_SIZE=512
|
||||
if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
|
@ -18,7 +18,6 @@ fi
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
fio_py="python $rootdir/scripts/fio.py"
|
||||
|
||||
ISCSI_PORT=3260
|
||||
NVMF_PORT=4420
|
||||
|
||||
timing_enter nvme_remote
|
||||
|
@ -1,21 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export TARGET_IP=127.0.0.1
|
||||
export INITIATOR_IP=127.0.0.1
|
||||
|
||||
testdir=$(readlink -f $(dirname $0))
|
||||
rootdir=$(readlink -f $testdir/../../..)
|
||||
source $rootdir/test/common/autotest_common.sh
|
||||
source $rootdir/test/iscsi_tgt/common.sh
|
||||
|
||||
# iSCSI target configuration
|
||||
BLOCKSIZE=$1
|
||||
RUNTIME=$2
|
||||
PMEM_BDEVS=""
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
PMEM_SIZE=128
|
||||
PMEM_BLOCK_SIZE=512
|
||||
TGT_NR=10
|
||||
|
@ -12,11 +12,6 @@ fi
|
||||
|
||||
timing_enter rbd
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
fio_py="python $rootdir/scripts/fio.py"
|
||||
|
@ -9,11 +9,6 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
|
||||
timing_enter reset
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
MALLOC_BDEV_SIZE=64
|
||||
MALLOC_BLOCK_SIZE=512
|
||||
|
||||
|
@ -7,11 +7,6 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
|
||||
timing_enter rpc_config
|
||||
|
||||
# iSCSI target configuration
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
MALLOC_BDEV_SIZE=64
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user