test/iscsi: remove VPP tests

All VPP tests were the same tests as usual posix iSCSI tests.
TEST_TYPE was used to direct which tests to run and in some cases
with what parameter.

Since VPP is deprecated, this type of selection is no longer needed.
All tests will run with default socket abstraction.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I292f1b5141ec8c4dacb4a43c6f51e4d30501a92a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3730
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Tomasz Zawadzki 2020-08-11 06:36:11 -04:00
parent 7d6e0802a3
commit 99dd44e8da
20 changed files with 79 additions and 146 deletions

View File

@ -210,7 +210,7 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
timing_exit lib
if [ $SPDK_TEST_ISCSI -eq 1 ]; then
run_test "iscsi_tgt_posix" ./test/iscsi_tgt/iscsi_tgt.sh posix
run_test "iscsi_tgt" ./test/iscsi_tgt/iscsi_tgt.sh
run_test "spdkcli_iscsi" ./test/spdkcli/iscsi.sh
# Run raid spdkcli test under iSCSI since blockdev tests run on systems that can't run spdkcli yet

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
if [ -z "$TARGET_IP" ]; then
echo "TARGET_IP not defined in environment"
@ -56,7 +55,7 @@ $rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
$rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
sleep 1
trap 'killprocess $iscsipid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $iscsipid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
$rootdir/test/app/fuzz/iscsi_fuzz/iscsi_fuzz -m 0xF0 -T $TARGET_IP -t $TEST_TIMEOUT 2> $output_dir/iscsi_autofuzz_logs.txt
@ -69,6 +68,6 @@ trap - SIGINT SIGTERM EXIT
killprocess $iscsipid
iscsitestfini $1
iscsitestfini
timing_exit iscsi_fuzz_test

View File

@ -5,7 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
iscsitestinit $1
iscsitestinit
MALLOC_BDEV_SIZE=64
MALLOC_BLOCK_SIZE=512
@ -17,7 +17,7 @@ timing_enter start_iscsi_tgt
"${ISCSI_APP[@]}" -m 0x2 -p 1 -s 512 --wait-for-rpc &
pid=$!
echo "iSCSI target launched. pid: $pid"
trap 'killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 4
# Minimal number of bdev io pool (5) and cache (1)
@ -36,7 +36,7 @@ $rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
# "-d" ==> disable CHAP authentication
$rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
sleep 1
trap 'killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
"$rootdir/test/bdev/bdevperf/bdevperf" --json <(initiator_json_config) -q 128 -o 4096 -w write -t 1
"$rootdir/test/bdev/bdevperf/bdevperf" --json <(initiator_json_config) -q 128 -o 4096 -w read -t 1
@ -47,4 +47,4 @@ trap - SIGINT SIGTERM EXIT
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
function node_login_fio_logout() {
for arg in "$@"; do
@ -56,7 +55,7 @@ timing_enter start_iscsi_tgt
pid=$!
echo "Process pid: $pid"
trap 'killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 16
@ -90,4 +89,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
rpc_py="$rootdir/scripts/rpc.py"
node_base="iqn.2013-06.com.intel.ch.spdk"
@ -17,7 +16,7 @@ timing_enter start_iscsi_tgt
pid=$!
echo "Process pid: $pid"
trap '$rpc_py bdev_split_delete Name0n1 || true; killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap '$rpc_py bdev_split_delete Name0n1 || true; killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 4 -b $node_base
@ -42,7 +41,7 @@ iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
waitforiscsidevices 1
trap 'for new_dir in $(dir -d /mnt/*dir); do umount $new_dir; rm -rf $new_dir; done;
iscsicleanup; killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
iscsicleanup; killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
echo "Test error injection"
$rpc_py bdev_error_inject_error EE_Malloc0 'all' 'failure' -n 1000
@ -127,4 +126,4 @@ if [ -z "$NO_NVME" ]; then
fi
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -6,8 +6,7 @@ source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
source $rootdir/scripts/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
rpc_py="$rootdir/scripts/rpc.py"
# Remove lvol bdevs and stores.
@ -30,7 +29,7 @@ timing_enter start_iscsi_tgt
pid=$!
echo "Process pid: $pid"
trap 'killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 16
@ -63,7 +62,7 @@ iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
waitforiscsidevices 1
trap 'iscsicleanup; remove_backends; umount /mnt/device; rm -rf /mnt/device; killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'iscsicleanup; remove_backends; umount /mnt/device; rm -rf /mnt/device; killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
mkdir -p /mnt/device
@ -141,4 +140,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup
remove_backends
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
delete_tmp_files() {
rm -f $testdir/iscsi2.json
@ -93,7 +92,7 @@ iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
waitforiscsidevices 2
trap 'iscsicleanup; killprocess $pid; iscsitestfini $1; delete_tmp_files; exit 1' SIGINT SIGTERM EXIT
trap 'iscsicleanup; killprocess $pid; iscsitestfini; delete_tmp_files; exit 1' SIGINT SIGTERM EXIT
$fio_py -p iscsi -i 4096 -d 1 -t randrw -r 1 -v
$fio_py -p iscsi -i 131072 -d 32 -t randrw -r 1 -v
@ -146,4 +145,4 @@ trap - SIGINT SIGTERM EXIT
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
if [ -z "$TARGET_IP" ]; then
echo "TARGET_IP not defined in environment"
@ -46,7 +45,7 @@ $rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
$rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
sleep 1
trap 'killprocess $iscsipid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $iscsipid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
$rootdir/test/app/fuzz/iscsi_fuzz/iscsi_fuzz -m 0xF0 -T $TARGET_IP -t 30 2> $output_dir/iscsi_autofuzz_logs.txt
@ -59,6 +58,6 @@ trap - SIGINT SIGTERM EXIT
killprocess $iscsipid
iscsitestfini $1
iscsitestfini
timing_exit iscsi_fuzz

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
MALLOC_BDEV_SIZE=64
MALLOC_BLOCK_SIZE=512
@ -35,7 +34,7 @@ $rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
# "-d" ==> disable CHAP authentication
$rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
sleep 1
trap 'killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
"$rootdir/test/bdev/bdevperf/bdevperf" --json <(initiator_json_config) -q 128 -o 4096 -w verify -t 5 -s 512
if [ $RUN_NIGHTLY -eq 1 ]; then
@ -48,4 +47,4 @@ trap - SIGINT SIGTERM EXIT
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
rpc_py="$rootdir/scripts/rpc.py"
fio_py="$rootdir/scripts/fio.py"
@ -96,7 +95,7 @@ for ((i = 0; i < 2; i++)); do
timing_exit start_iscsi_tgt_$i
rpc_config $rpc_addr $NETMASK
trap 'kill_all_iscsi_target; iscsitestfini $1; exit 1' \
trap 'kill_all_iscsi_target; iscsitestfini; exit 1' \
SIGINT SIGTERM EXIT
done
@ -127,4 +126,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup
$rpc_py -s $rpc_second_addr spdk_kill_instance SIGTERM
iscsitestfini $1
iscsitestfini

View File

@ -9,14 +9,6 @@ fi
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type (posix/vpp)
if [ "$1" == "posix" ] || [ "$1" == "vpp" ]; then
TEST_TYPE=$1
else
echo "No iSCSI test type specified"
exit 1
fi
# Run cleanup once to make sure we remove any stale iscsiadm
# entries if they were missed in previous runs
iscsicleanup
@ -26,29 +18,19 @@ create_veth_interfaces
trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT
run_test "iscsi_tgt_sock" ./test/iscsi_tgt/sock/sock.sh $TEST_TYPE
if [ "$TEST_TYPE" == "posix" ]; then
# calsoft doesn't handle TCP stream properly and fails decoding iSCSI
# requests when are divided by TCP segmentation. This is very common
# situation for VPP and causes that calsoft.sh never PASS.
if [[ -d /usr/local/calsoft ]]; then
run_test "iscsi_tgt_calsoft" ./test/iscsi_tgt/calsoft/calsoft.sh
else
skip_run_test_with_warning "WARNING: Calsoft binaries not found, skipping test!"
fi
run_test "iscsi_tgt_sock" ./test/iscsi_tgt/sock/sock.sh
if [[ -d /usr/local/calsoft ]]; then
run_test "iscsi_tgt_calsoft" ./test/iscsi_tgt/calsoft/calsoft.sh
else
skip_run_test_with_warning "WARNING: Calsoft binaries not found, skipping test!"
fi
run_test "iscsi_tgt_filesystem" ./test/iscsi_tgt/filesystem/filesystem.sh
run_test "iscsi_tgt_reset" ./test/iscsi_tgt/reset/reset.sh
run_test "iscsi_tgt_rpc_config" ./test/iscsi_tgt/rpc_config/rpc_config.sh $TEST_TYPE
run_test "iscsi_tgt_rpc_config" ./test/iscsi_tgt/rpc_config/rpc_config.sh
run_test "iscsi_tgt_iscsi_lvol" ./test/iscsi_tgt/lvol/iscsi_lvol.sh
run_test "iscsi_tgt_fio" ./test/iscsi_tgt/fio/fio.sh
run_test "iscsi_tgt_qos" ./test/iscsi_tgt/qos/qos.sh
# IP Migration tests do not support network namespaces,
# they can only be run on posix sockets.
if [ "$TEST_TYPE" == "posix" ]; then
run_test "iscsi_tgt_ip_migration" ./test/iscsi_tgt/ip_migration/ip_migration.sh
fi
run_test "iscsi_tgt_ip_migration" ./test/iscsi_tgt/ip_migration/ip_migration.sh
run_test "iscsi_tgt_trace_record" ./test/iscsi_tgt/trace_record/trace_record.sh
if [ $RUN_NIGHTLY -eq 1 ]; then
@ -59,32 +41,22 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
run_test "iscsi_tgt_digests" ./test/iscsi_tgt/digests/digests.sh
fi
if [ $SPDK_TEST_RBD -eq 1 ]; then
# RBD tests do not support network namespaces,
# they can only be run on posix sockets.
if [ "$TEST_TYPE" == "posix" ]; then
if ! hash ceph; then
echo "ERROR: SPDK_TEST_RBD requested but no ceph installed!"
false
fi
run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh
if ! hash ceph; then
echo "ERROR: SPDK_TEST_RBD requested but no ceph installed!"
false
fi
run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh
fi
trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT
if [ $SPDK_TEST_NVMF -eq 1 ]; then
# NVMe-oF tests do not support network namespaces,
# they can only be run on posix sockets.
if [ "$TEST_TYPE" == "posix" ]; then
# Test configure remote NVMe device from rpc and conf file
run_test "iscsi_tgt_fio_remote_nvme" ./test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh
fi
# Test configure remote NVMe device from rpc and conf file
run_test "iscsi_tgt_fio_remote_nvme" ./test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh
fi
if [ $RUN_NIGHTLY -eq 1 ]; then
if [ "$TEST_TYPE" == "posix" ]; then
run_test "iscsi_tgt_fuzz" ./test/iscsi_tgt/fuzz/fuzz.sh
fi
run_test "iscsi_tgt_fuzz" ./test/iscsi_tgt/fuzz/fuzz.sh
run_test "iscsi_tgt_multiconnection" ./test/iscsi_tgt/multiconnection/multiconnection.sh
fi

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
MALLOC_BDEV_SIZE=128
MALLOC_BLOCK_SIZE=512
@ -27,7 +26,7 @@ timing_enter start_iscsi_tgt
pid=$!
echo "Process pid: $pid"
trap 'iscsicleanup; killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'iscsicleanup; killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 16
@ -81,4 +80,4 @@ trap - SIGINT SIGTERM EXIT
rm -f ./local-job*
iscsicleanup
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
rpc_py="$rootdir/scripts/rpc.py"
fio_py="$rootdir/scripts/fio.py"
@ -37,7 +36,7 @@ timing_enter start_iscsi_tgt
"${ISCSI_APP[@]}" --wait-for-rpc &
iscsipid=$!
echo "iSCSI target launched. pid: $iscsipid"
trap 'remove_backends; iscsicleanup; killprocess $iscsipid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'remove_backends; iscsicleanup; killprocess $iscsipid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $iscsipid
$rpc_py iscsi_set_options -o 30 -a 128
@ -80,4 +79,4 @@ rm -f ./local-job*
iscsicleanup
remove_backends
killprocess $iscsipid
iscsitestfini $1
iscsitestfini

View File

@ -7,8 +7,7 @@ source $rootdir/test/nvmf/common.sh
source $rootdir/test/iscsi_tgt/common.sh
nvmftestinit
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
rpc_py="$rootdir/scripts/rpc.py"
fio_py="$rootdir/scripts/fio.py"
@ -25,7 +24,7 @@ function run_nvme_remote() {
"${ISCSI_APP[@]}" -r "$iscsi_rpc_addr" -m 0x1 -p 0 -s 512 --wait-for-rpc &
iscsipid=$!
echo "iSCSI target launched. pid: $iscsipid"
trap 'killprocess $iscsipid; iscsitestfini $1; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $iscsipid; iscsitestfini; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $iscsipid "$iscsi_rpc_addr"
$rpc_py -s "$iscsi_rpc_addr" iscsi_set_options -o 30 -a 16
$rpc_py -s "$iscsi_rpc_addr" framework_start_init
@ -55,7 +54,7 @@ function run_nvme_remote() {
"${NVMF_APP[@]}" -m 0x2 -p 1 -s 512 --wait-for-rpc &
nvmfpid=$!
echo "NVMf target launched. pid: $nvmfpid"
trap 'iscsitestfini $1; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
trap 'iscsitestfini; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $nvmfpid
$rpc_py framework_start_init
$rpc_py nvmf_create_transport -t RDMA -u 8192
@ -73,7 +72,7 @@ timing_enter start_iscsi_tgt
run_nvme_remote "local"
trap 'iscsicleanup; killprocess $iscsipid;
rm -f ./local-job0-0-verify.state; iscsitestfini $1; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
rm -f ./local-job0-0-verify.state; iscsitestfini; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
echo "Running FIO"
$fio_py -p iscsi -i 4096 -d 1 -t randrw -r 1 -v
@ -94,5 +93,5 @@ iscsicleanup
killprocess $iscsipid
$rpc_py nvmf_delete_subsystem nqn.2016-06.io.spdk:cnode1
iscsitestfini $1
iscsitestfini
nvmftestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
function run_fio() {
local bdev_name=$1
@ -61,7 +60,7 @@ timing_enter start_iscsi_tgt
"${ISCSI_APP[@]}" &
pid=$!
echo "Process pid: $pid"
trap 'killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $pid
echo "iscsi_tgt is listening. Running tests..."
@ -80,7 +79,7 @@ sleep 1
iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
trap 'iscsicleanup; killprocess $pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'iscsicleanup; killprocess $pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
# Run FIO without any QOS limits to determine the raw performance
run_fio Malloc0
@ -141,4 +140,4 @@ rm -f ./local-job0-0-verify.state
trap - SIGINT SIGTERM EXIT
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
timing_enter rbd_setup
rbd_setup $TARGET_IP $TARGET_NAMESPACE
@ -21,7 +20,7 @@ timing_enter start_iscsi_tgt
"${ISCSI_APP[@]}" -m $ISCSI_TEST_CORE_MASK --wait-for-rpc &
pid=$!
trap 'killprocess $pid; rbd_cleanup; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $pid; rbd_cleanup; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 16
@ -68,4 +67,4 @@ $rpc_py bdev_rbd_delete $rbd_bdev
killprocess $pid
rbd_cleanup
iscsitestfini $1
iscsitestfini

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
MALLOC_BDEV_SIZE=64
MALLOC_BLOCK_SIZE=512
@ -53,7 +52,7 @@ $fio_py -p iscsi -i 512 -d 1 -t read -r 60 &
fiopid=$!
echo "FIO pid: $fiopid"
trap 'iscsicleanup; killprocess $pid; killprocess $fiopid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'iscsicleanup; killprocess $pid; killprocess $fiopid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
# Do 3 resets while making sure iscsi_tgt and fio are still running
for i in 1 2 3; do
@ -73,4 +72,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -5,15 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp.
iscsitestinit $1
if [ "$1" == "posix" ] || [ "$1" == "vpp" ]; then
TEST_TYPE=$1
else
echo "No iSCSI test type specified"
exit 1
fi
iscsitestinit
MALLOC_BDEV_SIZE=64
@ -59,4 +51,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup
killprocess $pid
iscsitestfini $1
iscsitestfini

View File

@ -62,23 +62,7 @@ function waitfortcp() {
return $ret
}
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
if [ "$1" == "iso" ]; then
TEST_TYPE=$2
else
TEST_TYPE=$1
fi
if [ -z "$TEST_TYPE" ]; then
TEST_TYPE="posix"
fi
if [ "$TEST_TYPE" != "posix" ] && [ "$TEST_TYPE" != "vpp" ]; then
echo "No correct sock implmentation specified"
exit 1
fi
iscsitestinit
HELLO_SOCK_APP="${TARGET_NS_CMD[*]} $SPDK_EXAMPLE_DIR/hello_sock"
SOCAT_APP="socat"
@ -92,13 +76,13 @@ echo "Testing client path"
# start echo server using socat
$SOCAT_APP tcp-l:$ISCSI_PORT,fork,bind=$INITIATOR_IP exec:'/bin/cat' &
server_pid=$!
trap 'killprocess $server_pid;iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $server_pid;iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitfortcp $server_pid $INITIATOR_IP:$ISCSI_PORT
# send message using hello_sock client
message="**MESSAGE:This is a test message from the client**"
response=$(echo $message | $HELLO_SOCK_APP -H $INITIATOR_IP -P $ISCSI_PORT -N $TEST_TYPE)
response=$(echo $message | $HELLO_SOCK_APP -H $INITIATOR_IP -P $ISCSI_PORT -N "posix")
if ! echo "$response" | grep -q "$message"; then
exit 1
@ -117,9 +101,9 @@ timing_exit sock_client
timing_enter sock_server
# start echo server using hello_sock echo server
$HELLO_SOCK_APP -H $TARGET_IP -P $ISCSI_PORT -S -N $TEST_TYPE &
$HELLO_SOCK_APP -H $TARGET_IP -P $ISCSI_PORT -S -N "posix" &
server_pid=$!
trap 'killprocess $server_pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $server_pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $server_pid
# send message to server using socat
@ -134,5 +118,5 @@ trap - SIGINT SIGTERM EXIT
killprocess $server_pid
iscsitestfini $1
iscsitestfini
timing_exit sock_server

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix.
iscsitestinit $1
iscsitestinit
TRACE_TMP_FOLDER=./tmp-trace
TRACE_RECORD_OUTPUT=${TRACE_TMP_FOLDER}/record.trace
@ -41,7 +40,7 @@ echo "start iscsi_tgt with trace enabled"
iscsi_pid=$!
echo "Process pid: $iscsi_pid"
trap 'killprocess $iscsi_pid; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'killprocess $iscsi_pid; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
waitforlisten $iscsi_pid
@ -72,7 +71,7 @@ iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
waitforiscsidevices $((CONNECTION_NUMBER + 1))
trap 'iscsicleanup; killprocess $iscsi_pid; killprocess $record_pid; delete_tmp_files; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'iscsicleanup; killprocess $iscsi_pid; killprocess $record_pid; delete_tmp_files; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
echo "Running FIO"
$fio_py -p iscsi -i 131072 -d 32 -t randrw -r 1
@ -87,7 +86,7 @@ for i in $(seq 0 $CONNECTION_NUMBER); do
done
echo -e $RPCS | $rpc_py
trap 'delete_tmp_files; iscsitestfini $1; exit 1' SIGINT SIGTERM EXIT
trap 'delete_tmp_files; iscsitestfini; exit 1' SIGINT SIGTERM EXIT
killprocess $iscsi_pid
killprocess $record_pid
@ -131,4 +130,4 @@ for i in $(seq 0 $((len_arr_record_num - 1))); do
done
trap - SIGINT SIGTERM EXIT
iscsitestfini $1
iscsitestfini