test/iscsi: rename PORT to ISCSI_PORT in tests
This makes it clear and common among all iSCSI scripts what ISCSI_PORT is refers to. Change-Id: I01924179fb304b9cd111c39ff1b07aa3427d2c0c Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/405544 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
49b546290a
commit
b4db5cf9c7
@ -12,7 +12,7 @@ fi
|
||||
timing_enter calsoft
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -40,7 +40,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev -b MyBdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
# "MyBdev:0" ==> use MyBdev blockdev for LUN0
|
||||
|
@ -9,13 +9,13 @@ function node_login_fio_logout()
|
||||
{
|
||||
for arg in "$@"
|
||||
do
|
||||
iscsiadm -m node -p $TARGET_IP:$PORT -o update -n node.conn[0].iscsi.$arg
|
||||
iscsiadm -m node -p $TARGET_IP:$ISCSI_PORT -o update -n node.conn[0].iscsi.$arg
|
||||
done
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
sleep 1
|
||||
$fio_py 512 1 write 2
|
||||
$fio_py 512 1 read 2
|
||||
iscsiadm -m node --logout -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --logout -p $TARGET_IP:$ISCSI_PORT
|
||||
sleep 1
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ function iscsi_header_data_digest_test()
|
||||
timing_enter digests
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -83,7 +83,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
# "Malloc0:0" ==> use Malloc0 blockdev for LUN0
|
||||
@ -93,11 +93,11 @@ $rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
$rpc_py construct_target_node Target3 Target3_alias 'Malloc0:0' '1:2' 64 -d
|
||||
sleep 1
|
||||
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
|
||||
# iscsiadm installed by some Fedora releases loses DataDigest parameter.
|
||||
# Check and avoid setting DataDigest.
|
||||
DataDigestAbility=`iscsiadm -m node -p $TARGET_IP:$PORT | grep DataDigest || true`
|
||||
DataDigestAbility=`iscsiadm -m node -p $TARGET_IP:$ISCSI_PORT | grep DataDigest || true`
|
||||
if [ "$DataDigestAbility"x = x ]; then
|
||||
iscsi_header_digest_test
|
||||
else
|
||||
|
@ -15,7 +15,7 @@ cp $testdir/iscsi.conf.in $testdir/iscsi.conf
|
||||
$rootdir/scripts/gen_nvme.sh >> $testdir/iscsi.conf
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -35,7 +35,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_error_bdev 'Malloc0'
|
||||
# "1:2" ==> map PortalGroup1 to InitiatorGroup2
|
||||
@ -44,8 +44,8 @@ $rpc_py construct_error_bdev 'Malloc0'
|
||||
$rpc_py construct_target_node Target0 Target0_alias EE_Malloc0:0 1:2 64 -d
|
||||
sleep 1
|
||||
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
|
||||
trap 'for new_dir in `dir -d /mnt/*dir`; do umount $new_dir; rm -rf $new_dir; done; \
|
||||
iscsicleanup; killprocess $pid; exit 1' SIGINT SIGTERM EXIT
|
||||
@ -79,8 +79,8 @@ if [ -z "$NO_NVME" ]; then
|
||||
$rpc_py construct_target_node Target1 Target1_alias Nvme0n1:0 1:2 64 -d
|
||||
fi
|
||||
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
|
||||
devs=$(iscsiadm -m session -P 3 | grep "Attached scsi disk" | awk '{print $4}')
|
||||
|
||||
|
@ -9,7 +9,7 @@ source $rootdir/scripts/common.sh
|
||||
timing_enter filesystem
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -40,7 +40,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
bdf=`iter_pci_class_code 01 08 02 | head -1`
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_nvme_bdev -b "Nvme0" -t "pcie" -a $bdf
|
||||
|
||||
@ -59,8 +59,8 @@ fi
|
||||
$rpc_py construct_target_node Target1 Target1_alias 'lvs_0/lbd_0:0' '1:2' 256 -d
|
||||
sleep 1
|
||||
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
|
||||
trap "remove_backends; umount /mnt/device; rm -rf /mnt/device; iscsicleanup; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
@ -87,7 +87,7 @@ for fstype in "ext4" "btrfs" "xfs"; do
|
||||
|
||||
iscsiadm -m node --logout
|
||||
sleep 1
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
sleep 1
|
||||
dev=$(iscsiadm -m session -P 3 | grep "Attached scsi disk" | awk '{print $4}')
|
||||
mount -o rw /dev/${dev}1 /mnt/device
|
||||
|
@ -47,7 +47,7 @@ timing_enter fio
|
||||
cp $testdir/iscsi.conf.in $testdir/iscsi.conf
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -70,7 +70,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
# "Malloc0:0" ==> use Malloc0 blockdev for LUN0
|
||||
@ -80,8 +80,8 @@ $rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
$rpc_py construct_target_node Target3 Target3_alias 'Malloc0:0' '1:2' 64 -d
|
||||
sleep 1
|
||||
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
|
||||
trap "iscsicleanup; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
|
@ -8,7 +8,7 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
timing_enter initiator
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -30,7 +30,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
# "Malloc0:0" ==> use Malloc0 blockdev for LUN0
|
||||
|
@ -8,7 +8,7 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
rpc_py="python $rootdir/scripts/rpc.py"
|
||||
fio_py="python $rootdir/scripts/fio.py"
|
||||
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
NETMASK=127.0.0.0/24
|
||||
MIGRATION_ADDRESS=127.0.0.2
|
||||
|
||||
@ -29,7 +29,7 @@ function rpc_config() {
|
||||
|
||||
function rpc_add_target_node() {
|
||||
$rpc_py -s $1 add_ip_address 1 $MIGRATION_ADDRESS
|
||||
$rpc_py -s $1 add_portal_group 1 $MIGRATION_ADDRESS:$PORT
|
||||
$rpc_py -s $1 add_portal_group 1 $MIGRATION_ADDRESS:$ISCSI_PORT
|
||||
$rpc_py -s $1 construct_target_node target1 target1_alias 'Malloc0:0' '1:1' 64 -d
|
||||
}
|
||||
|
||||
@ -65,9 +65,9 @@ rpc_first_addr="/var/tmp/spdk0.sock"
|
||||
rpc_add_target_node $rpc_first_addr
|
||||
|
||||
sleep 1
|
||||
iscsiadm -m discovery -t sendtargets -p $MIGRATION_ADDRESS:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $MIGRATION_ADDRESS:$ISCSI_PORT
|
||||
sleep 1
|
||||
iscsiadm -m node --login -p $MIGRATION_ADDRESS:$PORT
|
||||
iscsiadm -m node --login -p $MIGRATION_ADDRESS:$ISCSI_PORT
|
||||
|
||||
# fio tests for multi-process
|
||||
sleep 1
|
||||
|
@ -11,7 +11,7 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
timing_enter iscsi_lvol
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -42,7 +42,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
timing_enter setup
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
for i in `seq 1 $NUM_MALLOC`; do
|
||||
INITIATOR_TAG=$((i+2))
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
@ -60,8 +60,8 @@ timing_exit setup
|
||||
sleep 1
|
||||
|
||||
timing_enter discovery
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
timing_exit discovery
|
||||
|
||||
timing_enter fio
|
||||
|
@ -12,7 +12,7 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
BLOCKSIZE=$1
|
||||
RUNTIME=$2
|
||||
PMEM_BDEVS=""
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -37,7 +37,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
timing_exit start_iscsi_target
|
||||
|
||||
timing_enter setup
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
for i in `seq 1 $TGT_NR`; do
|
||||
INITIATOR_TAG=$((i+1))
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
@ -55,8 +55,8 @@ timing_exit setup
|
||||
sleep 1
|
||||
|
||||
timing_enter discovery
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
timing_exit discovery
|
||||
|
||||
timing_enter fio_test
|
||||
|
@ -13,7 +13,7 @@ fi
|
||||
timing_enter rbd
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -33,7 +33,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_rbd_bdev $RBD_POOL $RBD_NAME 4096
|
||||
$rpc_py get_bdevs
|
||||
@ -44,8 +44,8 @@ $rpc_py get_bdevs
|
||||
$rpc_py construct_target_node Target3 Target3_alias 'Ceph0:0' '1:2' 64 -d
|
||||
sleep 1
|
||||
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
|
||||
trap "iscsicleanup; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
|
@ -10,7 +10,7 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
timing_enter reset
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -37,7 +37,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$PORT
|
||||
$rpc_py add_portal_group 1 $TARGET_IP:$ISCSI_PORT
|
||||
$rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
# "Malloc0:0" ==> use Malloc0 blockdev for LUN0
|
||||
@ -47,8 +47,8 @@ $rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
$rpc_py construct_target_node Target3 Target3_alias 'Malloc0:0' '1:2' 64 -d
|
||||
sleep 1
|
||||
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$PORT
|
||||
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
sleep 1
|
||||
dev=$(iscsiadm -m session -P 3 | grep "Attached scsi disk" | awk '{print $4}')
|
||||
|
||||
|
@ -8,7 +8,7 @@ source $rootdir/test/iscsi_tgt/common.sh
|
||||
timing_enter rpc_config
|
||||
|
||||
# iSCSI target configuration
|
||||
PORT=3260
|
||||
ISCSI_PORT=3260
|
||||
INITIATOR_TAG=2
|
||||
INITIATOR_NAME=ANY
|
||||
NETMASK=$INITIATOR_IP/32
|
||||
@ -31,7 +31,7 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
$rpc_config_py $rpc_py $TARGET_IP $INITIATOR_IP $PORT $NETMASK
|
||||
$rpc_config_py $rpc_py $TARGET_IP $INITIATOR_IP $ISCSI_PORT $NETMASK
|
||||
|
||||
$rpc_py get_bdevs
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user