test/iscsi_tgt: add timing for iscsi_tgt app startup
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ic05849d9381709340016f05148118173709ec152 Reviewed-on: https://review.gerrithub.io/362612 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
8933ba2119
commit
7c34782192
@ -28,6 +28,8 @@ mkdir -p /usr/local/etc
|
||||
cp $testdir/its.conf /usr/local/etc/
|
||||
cp $testdir/auth.conf /usr/local/etc/
|
||||
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
$ISCSI_APP -c $testdir/iscsi.conf -m 0x1 &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
@ -37,6 +39,8 @@ trap "killprocess $pid; exit 1 " SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
|
@ -23,6 +23,8 @@ NETMASK=$INITIATOR_IP/32
|
||||
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
$ISCSI_APP -c $testdir/iscsi.conf &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
@ -32,6 +34,8 @@ trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_error_bdev 'Malloc0'
|
||||
|
@ -18,6 +18,8 @@ MALLOC_BLOCK_SIZE=512
|
||||
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
$ISCSI_APP -c $testdir/iscsi.conf -m 0xFFFF &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
@ -27,6 +29,8 @@ trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
|
@ -16,6 +16,9 @@ function running_config() {
|
||||
# config file matched the running configuration
|
||||
killprocess $pid
|
||||
trap "iscsicleanup; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
timing_enter start_iscsi_tgt2
|
||||
|
||||
$ISCSI_APP -c /tmp/iscsi.conf &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
@ -23,6 +26,8 @@ function running_config() {
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt2
|
||||
|
||||
sleep 1
|
||||
$fio_py 4096 1 randrw 5
|
||||
}
|
||||
@ -54,6 +59,8 @@ MALLOC_BLOCK_SIZE=4096
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
fio_py="python $rootdir/scripts/fio.py"
|
||||
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
$ISCSI_APP -c $testdir/iscsi.conf &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
@ -63,6 +70,8 @@ trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
|
@ -13,6 +13,8 @@ RPC_PORT=5260
|
||||
|
||||
fio_py="python $rootdir/scripts/fio.py"
|
||||
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
$ISCSI_APP -c $testdir/iscsi.conf -m 0xFFFF &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
@ -22,6 +24,8 @@ trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$testdir/build_configuration.sh
|
||||
|
||||
sleep 1
|
||||
|
@ -41,6 +41,9 @@ do
|
||||
cp $testdir/iscsi.conf $testdir/iscsi.conf.$i
|
||||
port=$(($RPC_PORT + $i))
|
||||
echo "Listen 127.0.0.1:$port" >> $testdir/iscsi.conf.$i
|
||||
|
||||
timing_enter start_iscsi_tgt_$i
|
||||
|
||||
# TODO: run the different iSCSI instances on non-overlapping CPU masks
|
||||
$ISCSI_APP -c $testdir/iscsi.conf.$i -s 1000 -i $i -m 0xFFFF &
|
||||
pid=$!
|
||||
@ -50,6 +53,9 @@ do
|
||||
|
||||
waitforlisten $pid $port
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt_$i
|
||||
|
||||
rpc_config $port $NETMASK
|
||||
trap "kill_all_iscsi_target; exit 1" \
|
||||
SIGINT SIGTERM EXIT
|
||||
|
@ -32,6 +32,8 @@ bdevs=$($rpc_py construct_malloc_bdev 64 512)
|
||||
$rpc_py construct_nvmf_subsystem Virtual nqn.2016-06.io.spdk:cnode1 'transport:RDMA traddr:192.168.100.8 trsvcid:4420' '' -s SPDK00000000000001 -n "$bdevs"
|
||||
echo "NVMf subsystem created."
|
||||
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
# Start the iSCSI target
|
||||
$ISCSI_APP -c $testdir/iscsi.conf -m 0x1 -p 0 -s 512 &
|
||||
iscsipid=$!
|
||||
@ -41,6 +43,8 @@ trap "killprocess $iscsipid; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT
|
||||
waitforlisten $iscsipid 5261
|
||||
echo "iSCSI target has started."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
echo "Creating an iSCSI target node."
|
||||
$rpc_py -p 5261 add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py -p 5261 add_initiator_group 1 ALL $INITIATOR_IP/32
|
||||
|
@ -27,6 +27,8 @@ NETMASK=$INITIATOR_IP/32
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
fio_py="python $rootdir/scripts/fio.py"
|
||||
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
$ISCSI_APP -c $testdir/iscsi.conf -m 0xFFFF &
|
||||
pid=$!
|
||||
|
||||
@ -35,6 +37,8 @@ trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_rbd_bdev $RBD_POOL $RBD_NAME 4096
|
||||
|
@ -25,6 +25,8 @@ if ! hash sg_reset; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
timing_enter start_iscsi_tgt
|
||||
|
||||
$ISCSI_APP -c $testdir/iscsi.conf &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
@ -34,6 +36,8 @@ trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
|
@ -19,6 +19,7 @@ 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=$!
|
||||
@ -29,6 +30,8 @@ trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid ${RPC_PORT}
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_config_py $rpc_py
|
||||
|
||||
$rpc_py get_bdevs
|
||||
|
Loading…
Reference in New Issue
Block a user