Similar to our NVMf target, this is an iSCSI target that can interoperate with the Linux and Windows standard iSCSI initiators. Change-Id: I6961c5ef99f7b161c396330ed5b543ea29b0ca7b Signed-off-by: Ben Walker <benjamin.walker@intel.com>
48 lines
880 B
Bash
Executable File
48 lines
880 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
|
rootdir=$testdir/../../..
|
|
source $rootdir/scripts/autotest_common.sh
|
|
|
|
if [ -z "$TARGET_IP" ]; then
|
|
echo "TARGET_IP not defined in environment"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$INITIATOR_IP" ]; then
|
|
echo "INITIATOR_IP not defined in environment"
|
|
exit 1
|
|
fi
|
|
|
|
timing_enter rpc_config
|
|
|
|
# iSCSI target configuration
|
|
PORT=3260
|
|
RPC_PORT=5260
|
|
INITIATOR_TAG=2
|
|
INITIATOR_NAME=ALL
|
|
NETMASK=$INITIATOR_IP/32
|
|
MALLOC_LUN_SIZE=64
|
|
|
|
|
|
rpc_py=$rootdir/scripts/rpc.py
|
|
rpc_config_py="python $testdir/rpc_config.py"
|
|
|
|
|
|
./app/iscsi_tgt/iscsi_tgt -c $testdir/iscsi.conf &
|
|
pid=$!
|
|
echo "Process pid: $pid"
|
|
|
|
trap "process_core; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
|
|
|
waitforlisten $pid ${RPC_PORT}
|
|
echo "iscsi_tgt is listening. Running tests..."
|
|
|
|
$rpc_config_py $rpc_py
|
|
|
|
trap - SIGINT SIGTERM EXIT
|
|
|
|
iscsicleanup
|
|
killprocess $pid
|
|
timing_exit rpc_config
|