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 timing_exit lib
if [ $SPDK_TEST_ISCSI -eq 1 ]; then 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_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 # 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
if [ -z "$TARGET_IP" ]; then if [ -z "$TARGET_IP" ]; then
echo "TARGET_IP not defined in environment" 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 $rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
sleep 1 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 $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 killprocess $iscsipid
iscsitestfini $1 iscsitestfini
timing_exit iscsi_fuzz_test 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
iscsitestinit $1 iscsitestinit
MALLOC_BDEV_SIZE=64 MALLOC_BDEV_SIZE=64
MALLOC_BLOCK_SIZE=512 MALLOC_BLOCK_SIZE=512
@ -17,7 +17,7 @@ timing_enter start_iscsi_tgt
"${ISCSI_APP[@]}" -m 0x2 -p 1 -s 512 --wait-for-rpc & "${ISCSI_APP[@]}" -m 0x2 -p 1 -s 512 --wait-for-rpc &
pid=$! pid=$!
echo "iSCSI target launched. pid: $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 waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 4 $rpc_py iscsi_set_options -o 30 -a 4
# Minimal number of bdev io pool (5) and cache (1) # 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 # "-d" ==> disable CHAP authentication
$rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d $rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
sleep 1 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 write -t 1
"$rootdir/test/bdev/bdevperf/bdevperf" --json <(initiator_json_config) -q 128 -o 4096 -w read -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 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
function node_login_fio_logout() { function node_login_fio_logout() {
for arg in "$@"; do for arg in "$@"; do
@ -56,7 +55,7 @@ timing_enter start_iscsi_tgt
pid=$! pid=$!
echo "Process pid: $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 waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 16 $rpc_py iscsi_set_options -o 30 -a 16
@ -90,4 +89,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup iscsicleanup
killprocess $pid 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
rpc_py="$rootdir/scripts/rpc.py" rpc_py="$rootdir/scripts/rpc.py"
node_base="iqn.2013-06.com.intel.ch.spdk" node_base="iqn.2013-06.com.intel.ch.spdk"
@ -17,7 +16,7 @@ timing_enter start_iscsi_tgt
pid=$! pid=$!
echo "Process pid: $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 waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 4 -b $node_base $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 waitforiscsidevices 1
trap 'for new_dir in $(dir -d /mnt/*dir); do umount $new_dir; rm -rf $new_dir; done; 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" echo "Test error injection"
$rpc_py bdev_error_inject_error EE_Malloc0 'all' 'failure' -n 1000 $rpc_py bdev_error_inject_error EE_Malloc0 'all' 'failure' -n 1000
@ -127,4 +126,4 @@ if [ -z "$NO_NVME" ]; then
fi fi
killprocess $pid 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/test/iscsi_tgt/common.sh
source $rootdir/scripts/common.sh source $rootdir/scripts/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
rpc_py="$rootdir/scripts/rpc.py" rpc_py="$rootdir/scripts/rpc.py"
# Remove lvol bdevs and stores. # Remove lvol bdevs and stores.
@ -30,7 +29,7 @@ timing_enter start_iscsi_tgt
pid=$! pid=$!
echo "Process pid: $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 waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 16 $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 iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
waitforiscsidevices 1 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 mkdir -p /mnt/device
@ -141,4 +140,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup iscsicleanup
remove_backends remove_backends
killprocess $pid 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
delete_tmp_files() { delete_tmp_files() {
rm -f $testdir/iscsi2.json 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 iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
waitforiscsidevices 2 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 4096 -d 1 -t randrw -r 1 -v
$fio_py -p iscsi -i 131072 -d 32 -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 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
if [ -z "$TARGET_IP" ]; then if [ -z "$TARGET_IP" ]; then
echo "TARGET_IP not defined in environment" 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 $rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
sleep 1 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 $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 killprocess $iscsipid
iscsitestfini $1 iscsitestfini
timing_exit iscsi_fuzz timing_exit iscsi_fuzz

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
MALLOC_BDEV_SIZE=64 MALLOC_BDEV_SIZE=64
MALLOC_BLOCK_SIZE=512 MALLOC_BLOCK_SIZE=512
@ -35,7 +34,7 @@ $rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
# "-d" ==> disable CHAP authentication # "-d" ==> disable CHAP authentication
$rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d $rpc_py iscsi_create_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
sleep 1 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 "$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 if [ $RUN_NIGHTLY -eq 1 ]; then
@ -48,4 +47,4 @@ trap - SIGINT SIGTERM EXIT
killprocess $pid 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
rpc_py="$rootdir/scripts/rpc.py" rpc_py="$rootdir/scripts/rpc.py"
fio_py="$rootdir/scripts/fio.py" fio_py="$rootdir/scripts/fio.py"
@ -96,7 +95,7 @@ for ((i = 0; i < 2; i++)); do
timing_exit start_iscsi_tgt_$i timing_exit start_iscsi_tgt_$i
rpc_config $rpc_addr $NETMASK 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 SIGINT SIGTERM EXIT
done done
@ -127,4 +126,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup iscsicleanup
$rpc_py -s $rpc_second_addr spdk_kill_instance SIGTERM $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 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 # Run cleanup once to make sure we remove any stale iscsiadm
# entries if they were missed in previous runs # entries if they were missed in previous runs
iscsicleanup iscsicleanup
@ -26,29 +18,19 @@ create_veth_interfaces
trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT
run_test "iscsi_tgt_sock" ./test/iscsi_tgt/sock/sock.sh $TEST_TYPE run_test "iscsi_tgt_sock" ./test/iscsi_tgt/sock/sock.sh
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 if [[ -d /usr/local/calsoft ]]; then
run_test "iscsi_tgt_calsoft" ./test/iscsi_tgt/calsoft/calsoft.sh run_test "iscsi_tgt_calsoft" ./test/iscsi_tgt/calsoft/calsoft.sh
else else
skip_run_test_with_warning "WARNING: Calsoft binaries not found, skipping test!" skip_run_test_with_warning "WARNING: Calsoft binaries not found, skipping test!"
fi fi
fi
run_test "iscsi_tgt_filesystem" ./test/iscsi_tgt/filesystem/filesystem.sh 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_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_iscsi_lvol" ./test/iscsi_tgt/lvol/iscsi_lvol.sh
run_test "iscsi_tgt_fio" ./test/iscsi_tgt/fio/fio.sh run_test "iscsi_tgt_fio" ./test/iscsi_tgt/fio/fio.sh
run_test "iscsi_tgt_qos" ./test/iscsi_tgt/qos/qos.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 run_test "iscsi_tgt_ip_migration" ./test/iscsi_tgt/ip_migration/ip_migration.sh
fi
run_test "iscsi_tgt_trace_record" ./test/iscsi_tgt/trace_record/trace_record.sh run_test "iscsi_tgt_trace_record" ./test/iscsi_tgt/trace_record/trace_record.sh
if [ $RUN_NIGHTLY -eq 1 ]; then 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 run_test "iscsi_tgt_digests" ./test/iscsi_tgt/digests/digests.sh
fi fi
if [ $SPDK_TEST_RBD -eq 1 ]; then 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 if ! hash ceph; then
echo "ERROR: SPDK_TEST_RBD requested but no ceph installed!" echo "ERROR: SPDK_TEST_RBD requested but no ceph installed!"
false false
fi fi
run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh run_test "iscsi_tgt_rbd" ./test/iscsi_tgt/rbd/rbd.sh
fi fi
fi
trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT trap 'cleanup_veth_interfaces; exit 1' SIGINT SIGTERM EXIT
if [ $SPDK_TEST_NVMF -eq 1 ]; then 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 # 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 run_test "iscsi_tgt_fio_remote_nvme" ./test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh
fi fi
fi
if [ $RUN_NIGHTLY -eq 1 ]; then if [ $RUN_NIGHTLY -eq 1 ]; then
if [ "$TEST_TYPE" == "posix" ]; then
run_test "iscsi_tgt_fuzz" ./test/iscsi_tgt/fuzz/fuzz.sh run_test "iscsi_tgt_fuzz" ./test/iscsi_tgt/fuzz/fuzz.sh
fi
run_test "iscsi_tgt_multiconnection" ./test/iscsi_tgt/multiconnection/multiconnection.sh run_test "iscsi_tgt_multiconnection" ./test/iscsi_tgt/multiconnection/multiconnection.sh
fi fi

View File

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

View File

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

View File

@ -5,8 +5,7 @@ rootdir=$(readlink -f $testdir/../../..)
source $rootdir/test/common/autotest_common.sh source $rootdir/test/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
function run_fio() { function run_fio() {
local bdev_name=$1 local bdev_name=$1
@ -61,7 +60,7 @@ timing_enter start_iscsi_tgt
"${ISCSI_APP[@]}" & "${ISCSI_APP[@]}" &
pid=$! pid=$!
echo "Process pid: $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 waitforlisten $pid
echo "iscsi_tgt is listening. Running tests..." 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 discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
iscsiadm -m node --login -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 without any QOS limits to determine the raw performance
run_fio Malloc0 run_fio Malloc0
@ -141,4 +140,4 @@ rm -f ./local-job0-0-verify.state
trap - SIGINT SIGTERM EXIT trap - SIGINT SIGTERM EXIT
killprocess $pid 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
timing_enter rbd_setup timing_enter rbd_setup
rbd_setup $TARGET_IP $TARGET_NAMESPACE 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 & "${ISCSI_APP[@]}" -m $ISCSI_TEST_CORE_MASK --wait-for-rpc &
pid=$! 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 waitforlisten $pid
$rpc_py iscsi_set_options -o 30 -a 16 $rpc_py iscsi_set_options -o 30 -a 16
@ -68,4 +67,4 @@ $rpc_py bdev_rbd_delete $rbd_bdev
killprocess $pid killprocess $pid
rbd_cleanup 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. defaults to posix. iscsitestinit
iscsitestinit $1
MALLOC_BDEV_SIZE=64 MALLOC_BDEV_SIZE=64
MALLOC_BLOCK_SIZE=512 MALLOC_BLOCK_SIZE=512
@ -53,7 +52,7 @@ $fio_py -p iscsi -i 512 -d 1 -t read -r 60 &
fiopid=$! fiopid=$!
echo "FIO pid: $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 # Do 3 resets while making sure iscsi_tgt and fio are still running
for i in 1 2 3; do for i in 1 2 3; do
@ -73,4 +72,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup iscsicleanup
killprocess $pid 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/common/autotest_common.sh
source $rootdir/test/iscsi_tgt/common.sh source $rootdir/test/iscsi_tgt/common.sh
# $1 = test type posix or vpp. iscsitestinit
iscsitestinit $1
if [ "$1" == "posix" ] || [ "$1" == "vpp" ]; then
TEST_TYPE=$1
else
echo "No iSCSI test type specified"
exit 1
fi
MALLOC_BDEV_SIZE=64 MALLOC_BDEV_SIZE=64
@ -59,4 +51,4 @@ trap - SIGINT SIGTERM EXIT
iscsicleanup iscsicleanup
killprocess $pid killprocess $pid
iscsitestfini $1 iscsitestfini

View File

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

View File

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