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>
38 lines
732 B
Bash
Executable File
38 lines
732 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
|
rootdir=$(readlink -f $testdir/../../..)
|
|
source $rootdir/test/common/autotest_common.sh
|
|
source $rootdir/test/iscsi_tgt/common.sh
|
|
|
|
timing_enter rpc_config
|
|
|
|
MALLOC_BDEV_SIZE=64
|
|
|
|
|
|
rpc_py=$rootdir/scripts/rpc.py
|
|
rpc_config_py="python $testdir/rpc_config.py"
|
|
|
|
timing_enter start_iscsi_tgt
|
|
|
|
$ISCSI_APP -c $testdir/iscsi.conf &
|
|
pid=$!
|
|
echo "Process pid: $pid"
|
|
|
|
trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
|
|
|
waitforlisten $pid
|
|
echo "iscsi_tgt is listening. Running tests..."
|
|
|
|
timing_exit start_iscsi_tgt
|
|
|
|
$rpc_config_py $rpc_py $TARGET_IP $INITIATOR_IP $ISCSI_PORT $NETMASK
|
|
|
|
$rpc_py get_bdevs
|
|
|
|
trap - SIGINT SIGTERM EXIT
|
|
|
|
iscsicleanup
|
|
killprocess $pid
|
|
timing_exit rpc_config
|