test: use single quotes in trap instruction
Fix SC2064 issue. Use single quotes, otherwise trap expands now rather than when signalled. Change-Id: I0b3a9157f52eed037e8d217f639c64d6876ec1e1 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464655 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
This commit is contained in:
parent
0aa72ffb74
commit
90c84ec532
@ -243,7 +243,7 @@ if hash shellcheck 2>/dev/null; then
|
||||
SC1083,SC1087,SC1090,SC1091,SC1113,SC2001,SC2002,SC2003,SC2004,SC2005,\
|
||||
SC2009,SC2010,SC2012,SC2013,SC2015,SC2016,SC2018,SC2019,SC2022,SC2026,\
|
||||
SC2027,SC2030,SC2031,SC2034,SC2035,SC2039,SC2043,SC2044,SC2045,SC2046,SC2048,\
|
||||
SC2059,SC2064,SC2068,SC2074,SC2086,SC2088,SC2089,SC2090,SC2091,SC2094,\
|
||||
SC2059,SC2068,SC2074,SC2086,SC2088,SC2089,SC2090,SC2091,SC2094,\
|
||||
SC2097,SC2098,SC2103,SC2115,SC2116,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\
|
||||
SC2129,SC2140,SC2142,SC2143,SC2145,SC2146,SC2148,SC2152,SC2153,SC2154,SC2155,\
|
||||
SC2162,SC2164,SC2165,SC2166,SC2167,SC2174,SC2178,SC2181,SC2191,SC2192,SC2195,\
|
||||
|
@ -35,7 +35,7 @@ function nbd_function_test() {
|
||||
modprobe nbd
|
||||
$rootdir/test/app/bdev_svc/bdev_svc -r $rpc_server -i 0 -c ${conf} &
|
||||
nbd_pid=$!
|
||||
trap "killprocess $nbd_pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $nbd_pid; exit 1' SIGINT SIGTERM EXIT
|
||||
echo "Process nbd pid: $nbd_pid"
|
||||
waitforlisten $nbd_pid $rpc_server
|
||||
|
||||
@ -96,7 +96,7 @@ else
|
||||
fi
|
||||
$testdir/bdevio/bdevio -w -s $PRE_RESERVED_MEM -c $testdir/bdev.conf &
|
||||
bdevio_pid=$!
|
||||
trap "killprocess $bdevio_pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $bdevio_pid; exit 1' SIGINT SIGTERM EXIT
|
||||
echo "Process bdevio pid: $bdevio_pid"
|
||||
waitforlisten $bdevio_pid
|
||||
$testdir/bdevio/tests.py perform_tests
|
||||
|
@ -19,7 +19,7 @@ truncate -s 64M $testdir/aio.bdev
|
||||
$rootdir/test/app/bdev_svc/bdev_svc &
|
||||
bdev_svc_pid=$!
|
||||
|
||||
trap "killprocess $bdev_svc_pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $bdev_svc_pid; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $bdev_svc_pid
|
||||
$rpc_py construct_aio_bdev $testdir/aio.bdev aio0 4096
|
||||
|
@ -20,7 +20,7 @@ function compress_err_cleanup() {
|
||||
mkdir -p /tmp/pmem
|
||||
$rootdir/test/app/bdev_svc/bdev_svc &
|
||||
bdev_svc_pid=$!
|
||||
trap "killprocess $bdev_svc_pid; compress_err_cleanup; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $bdev_svc_pid; compress_err_cleanup; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $bdev_svc_pid
|
||||
bdf=$(iter_pci_class_code 01 08 02 | head -1)
|
||||
$rpc_py construct_nvme_bdev -b "Nvme0" -t "pcie" -a $bdf
|
||||
@ -36,7 +36,7 @@ killprocess $bdev_svc_pid
|
||||
timing_enter compress_test
|
||||
$rootdir/test/bdev/bdevio/bdevio -w &
|
||||
bdevio_pid=$!
|
||||
trap "killprocess $bdevio_pid; compress_err_cleanup; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $bdevio_pid; compress_err_cleanup; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $bdevio_pid
|
||||
$rpc_py set_compress_pmd -p 2
|
||||
$rpc_py construct_nvme_bdev -b "Nvme0" -t "pcie" -a $bdf
|
||||
@ -56,7 +56,7 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
fi
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -z -q $qd -o $iosize -w verify -t $runtime &
|
||||
bdevperf_pid=$!
|
||||
trap "killprocess $bdevperf_pid; compress_err_cleanup; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $bdevperf_pid; compress_err_cleanup; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $bdevperf_pid
|
||||
$rpc_py set_compress_pmd -p 2
|
||||
$rpc_py construct_nvme_bdev -b "Nvme0" -t "pcie" -a $bdf
|
||||
|
@ -24,7 +24,7 @@ fi
|
||||
|
||||
ocssd_original_dirver="$(basename $(readlink /sys/bus/pci/devices/$device/driver))"
|
||||
|
||||
trap "at_ftl_exit" SIGINT SIGTERM EXIT
|
||||
trap 'at_ftl_exit' SIGINT SIGTERM EXIT
|
||||
|
||||
# OCSSD is blacklisted so bind it to vfio/uio driver before testing
|
||||
PCI_WHITELIST="$device" PCI_BLACKLIST="" DRIVER_OVERRIDE="" ./scripts/setup.sh
|
||||
@ -77,7 +77,7 @@ if [ $SPDK_TEST_FTL_EXTENDED -eq 1 ]; then
|
||||
$rootdir/app/spdk_tgt/spdk_tgt &
|
||||
svc_pid=$!
|
||||
|
||||
trap "killprocess $svc_pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $svc_pid; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $svc_pid
|
||||
uuid=$($rpc_py construct_ftl_bdev -b nvme0 -a $device -l 0-3 | jq -r '.uuid')
|
||||
|
@ -27,7 +27,7 @@ echo " TransportID \"trtype:$TEST_TRANSPORT adrfam:IPv4 subnqn:nqn.2016-06.io.s
|
||||
$NVMF_APP -m 0xF &>$output_dir/nvmf_autofuzz_tgt_output.txt &
|
||||
nvmfpid=$!
|
||||
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; rm -f $testdir/nvmf_fuzz.conf; killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; rm -f $testdir/nvmf_fuzz.conf; killprocess $nvmfpid; nvmftestfini $1; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
|
@ -33,13 +33,13 @@ $VHOST_APP &>$output_dir/vhost_fuzz_tgt_output.txt &
|
||||
vhostpid=$!
|
||||
waitforlisten $vhostpid
|
||||
|
||||
trap "killprocess $vhostpid; exit 1" SIGINT SIGTERM exit
|
||||
trap 'killprocess $vhostpid; exit 1' SIGINT SIGTERM exit
|
||||
|
||||
$FUZZ_APP -t $TEST_TIMEOUT 2>$output_dir/vhost_autofuzz_output1.txt &
|
||||
fuzzpid=$!
|
||||
waitforlisten $fuzzpid $FUZZ_RPC_SOCK
|
||||
|
||||
trap "killprocess $vhostpid; killprocess $fuzzpid; exit 1" SIGINT SIGTERM exit
|
||||
trap 'killprocess $vhostpid; killprocess $fuzzpid; exit 1' SIGINT SIGTERM exit
|
||||
|
||||
if [ "$TEST_TRANSPORT" == "bdev" ] || [ "$TEST_TRANSPORT" == "all" ]; then
|
||||
$vhost_rpc_py construct_malloc_bdev -b Malloc0 64 512
|
||||
|
@ -19,7 +19,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 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 4
|
||||
# Minimal number of bdev io pool (5) and cache (1)
|
||||
@ -38,7 +38,7 @@ $rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
# "-d" ==> disable CHAP authentication
|
||||
$rpc_py construct_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
|
||||
sleep 1
|
||||
trap "killprocess $pid; rm -f $testdir/bdev.conf; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; rm -f $testdir/bdev.conf; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
# Prepare config file for iSCSI initiator
|
||||
echo "[iSCSI_Initiator]" > $testdir/bdev.conf
|
||||
|
@ -34,7 +34,7 @@ $ISCSI_APP -m 0x1 --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "killprocess $pid; delete_tmp_conf_files; exit 1 " SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; delete_tmp_conf_files; exit 1 ' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py load_subsystem_config < $testdir/iscsi.json
|
||||
|
@ -23,7 +23,7 @@ function create_veth_interfaces() {
|
||||
ip netns del $TARGET_NAMESPACE || true
|
||||
ip link delete $INITIATOR_INTERFACE || true
|
||||
|
||||
trap "cleanup_veth_interfaces $1; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'cleanup_veth_interfaces $1; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
# Create veth (Virtual ethernet) interface pair
|
||||
ip link add $INITIATOR_INTERFACE type veth peer name $TARGET_INTERFACE
|
||||
|
@ -71,7 +71,7 @@ $ISCSI_APP -m $ISCSI_TEST_CORE_MASK --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "killprocess $pid; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 16
|
||||
|
@ -20,7 +20,7 @@ $ISCSI_APP --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "$rpc_py destruct_split_vbdev Name0n1 || true; killprocess $pid; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap '$rpc_py destruct_split_vbdev Name0n1 || true; killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 4 -b $node_base
|
||||
|
@ -33,7 +33,7 @@ $ISCSI_APP -m $ISCSI_TEST_CORE_MASK --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "killprocess $pid; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 16
|
||||
@ -66,7 +66,7 @@ iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
waitforiscsidevices 1
|
||||
|
||||
trap "remove_backends; umount /mnt/device; rm -rf /mnt/device; iscsicleanup; killprocess $pid; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'remove_backends; umount /mnt/device; rm -rf /mnt/device; iscsicleanup; killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
mkdir -p /mnt/device
|
||||
|
||||
|
@ -24,14 +24,14 @@ function running_config() {
|
||||
# keep the same iscsiadm configuration to confirm that the
|
||||
# config file matched the running configuration
|
||||
killprocess $pid
|
||||
trap "iscsicleanup; delete_tmp_files; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; delete_tmp_files; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
timing_enter start_iscsi_tgt2
|
||||
|
||||
$ISCSI_APP --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
trap "iscsicleanup; killprocess $pid; delete_tmp_files; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $pid; delete_tmp_files; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid
|
||||
|
||||
$rpc_py load_config < $testdir/iscsi2.json
|
||||
@ -68,7 +68,7 @@ $ISCSI_APP --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
|
||||
@ -96,7 +96,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 $2; delete_tmp_files; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $pid; iscsitestfini $1 $2; 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
|
||||
|
@ -21,7 +21,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;exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid;exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 4
|
||||
$rpc_py start_subsystem_init
|
||||
@ -38,7 +38,7 @@ $rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE
|
||||
# "-d" ==> disable CHAP authentication
|
||||
$rpc_py construct_target_node disk1 disk1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 256 -d
|
||||
sleep 1
|
||||
trap "killprocess $pid; rm -f $testdir/bdev.conf; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; rm -f $testdir/bdev.conf; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
# Prepare config file for iSCSI initiator
|
||||
echo "[iSCSI_Initiator]" > $testdir/bdev.conf
|
||||
|
@ -51,7 +51,7 @@ for ((i = 0; i < 2; i++)); do
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "kill_all_iscsi_target; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'kill_all_iscsi_target; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid $rpc_addr
|
||||
$rpc_py -s $rpc_addr set_iscsi_options -o 30 -a 64
|
||||
@ -61,7 +61,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 $2; exit 1" \
|
||||
trap 'kill_all_iscsi_target; iscsitestfini $1 $2; exit 1' \
|
||||
SIGINT SIGTERM EXIT
|
||||
done
|
||||
|
||||
|
@ -22,7 +22,7 @@ fi
|
||||
# Network configuration
|
||||
create_veth_interfaces $TEST_TYPE
|
||||
|
||||
trap "cleanup_veth_interfaces $TEST_TYPE; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'cleanup_veth_interfaces $TEST_TYPE; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
run_test suite ./test/iscsi_tgt/sock/sock.sh $TEST_TYPE
|
||||
if [ "$TEST_TYPE" == "posix" ]; then
|
||||
@ -60,7 +60,7 @@ if [ $SPDK_TEST_RBD -eq 1 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
trap "cleanup_veth_interfaces $TEST_TYPE; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'cleanup_veth_interfaces $TEST_TYPE; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
if [ $SPDK_TEST_NVMF -eq 1 ]; then
|
||||
# NVMe-oF tests do not support network namespaces,
|
||||
|
@ -30,7 +30,7 @@ $ISCSI_APP -m $ISCSI_TEST_CORE_MASK --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "iscsicleanup; killprocess $pid; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 16
|
||||
|
@ -40,7 +40,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 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'remove_backends; iscsicleanup; killprocess $iscsipid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $iscsipid
|
||||
$rpc_py set_iscsi_options -o 30 -a 128
|
||||
|
@ -27,7 +27,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 $2; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $iscsipid; iscsitestfini $1 $2; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $iscsipid "$iscsi_rpc_addr"
|
||||
$rpc_py -s "$iscsi_rpc_addr" set_iscsi_options -o 30 -a 16
|
||||
$rpc_py -s "$iscsi_rpc_addr" start_subsystem_init
|
||||
@ -60,7 +60,7 @@ NVMF_APP="$rootdir/app/nvmf_tgt/nvmf_tgt"
|
||||
$NVMF_APP -m 0x2 -p 1 -s 512 --wait-for-rpc &
|
||||
nvmfpid=$!
|
||||
echo "NVMf target launched. pid: $nvmfpid"
|
||||
trap "iscsitestfini $1 $2; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsitestfini $1 $2; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py start_subsystem_init
|
||||
$rpc_py nvmf_create_transport -t RDMA -u 8192
|
||||
@ -77,8 +77,8 @@ timing_enter start_iscsi_tgt
|
||||
|
||||
run_nvme_remote "local"
|
||||
|
||||
trap "iscsicleanup; killprocess $iscsipid; \
|
||||
rm -f ./local-job0-0-verify.state; iscsitestfini $1 $2; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $iscsipid; \
|
||||
rm -f ./local-job0-0-verify.state; iscsitestfini $1 $2; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
echo "Running FIO"
|
||||
$fio_py -p iscsi -i 4096 -d 1 -t randrw -r 1 -v
|
||||
|
@ -81,7 +81,7 @@ touch $iscsi_fio_results
|
||||
timing_enter run_iscsi_app
|
||||
$rootdir/app/iscsi_tgt/iscsi_tgt -m $ISCSI_TGT_CM -r $testdir/rpc_iscsi.sock --wait-for-rpc &
|
||||
pid=$!
|
||||
trap "rm -f $testdir/perf.job; killprocess $pid; print_backtrace; exit 1" ERR SIGTERM SIGABRT
|
||||
trap 'rm -f $testdir/perf.job; killprocess $pid; print_backtrace; exit 1' ERR SIGTERM SIGABRT
|
||||
waitforlisten "$pid" "$testdir/rpc_iscsi.sock"
|
||||
$rpc_py set_iscsi_options -b "iqn.2016-06.io.spdk" -f "/usr/local/etc/spdk/auth.conf" -o 30 -i -l 0 -a 16
|
||||
$rpc_py start_subsystem_init
|
||||
|
@ -22,7 +22,7 @@ $ISCSI_APP -m $ISCSI_TEST_CORE_MASK --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "iscsicleanup; killprocess $pid; rm -f /tmp/pool_file*; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $pid; rm -f /tmp/pool_file*; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 16
|
||||
|
@ -59,7 +59,7 @@ timing_enter start_iscsi_tgt
|
||||
$ISCSI_APP &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
trap "killprocess $pid; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
@ -78,7 +78,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 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
# Run FIO without any QOS limits to determine the raw performance
|
||||
run_fio Malloc0
|
||||
|
@ -16,7 +16,7 @@ fi
|
||||
|
||||
timing_enter rbd_setup
|
||||
rbd_setup $TARGET_IP $TARGET_NAMESPACE
|
||||
trap "rbd_cleanup; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'rbd_cleanup; exit 1' SIGINT SIGTERM EXIT
|
||||
timing_exit rbd_setup
|
||||
|
||||
timing_enter rbd
|
||||
@ -29,7 +29,7 @@ timing_enter start_iscsi_tgt
|
||||
$ISCSI_APP -m $ISCSI_TEST_CORE_MASK --wait-for-rpc &
|
||||
pid=$!
|
||||
|
||||
trap "killprocess $pid; rbd_cleanup; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; rbd_cleanup; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 16
|
||||
@ -52,7 +52,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; rbd_cleanup; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $pid; rbd_cleanup; 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
|
||||
|
@ -27,7 +27,7 @@ $ISCSI_APP --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py set_iscsi_options -o 30 -a 16
|
||||
@ -56,7 +56,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 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $pid; killprocess $fiopid; iscsitestfini $1 $2; 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
|
||||
|
@ -29,7 +29,7 @@ $ISCSI_APP --wait-for-rpc &
|
||||
pid=$!
|
||||
echo "Process pid: $pid"
|
||||
|
||||
trap "killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $pid; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $pid
|
||||
$rpc_py wait_subsystem_init &
|
||||
|
@ -80,7 +80,7 @@ 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 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $server_pid;iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitfortcp $server_pid $INITIATOR_IP:$ISCSI_PORT
|
||||
|
||||
@ -107,7 +107,7 @@ timing_enter sock_server
|
||||
|
||||
# start echo server using hello_sock echo server
|
||||
$HELLO_SOCK_APP -H $TARGET_IP -P $ISCSI_PORT -S & server_pid=$!
|
||||
trap "killprocess $server_pid; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $server_pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $server_pid
|
||||
|
||||
# send message to server using socat
|
||||
|
@ -44,7 +44,7 @@ $ISCSI_APP -m 0xf --num-trace-entries $NUM_TRACE_ENTRIES --tpoint-group-mask 0xf
|
||||
iscsi_pid=$!
|
||||
echo "Process pid: $iscsi_pid"
|
||||
|
||||
trap "killprocess $iscsi_pid; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $iscsi_pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $iscsi_pid
|
||||
|
||||
@ -75,7 +75,7 @@ mkdir -p ${TRACE_TMP_FOLDER}
|
||||
record_pid=$!
|
||||
echo "Trace record pid: $record_pid"
|
||||
|
||||
trap "iscsicleanup; killprocess $iscsi_pid; killprocess $record_pid; delete_tmp_files; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'iscsicleanup; killprocess $iscsi_pid; killprocess $record_pid; delete_tmp_files; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
echo "Running FIO"
|
||||
$fio_py -p iscsi -i 131072 -d 32 -t randrw -r 1
|
||||
@ -90,7 +90,7 @@ for i in $(seq 0 $CONNECTION_NUMBER); do
|
||||
done
|
||||
echo -e $RPCS | $rpc_py
|
||||
|
||||
trap "delete_tmp_files; iscsitestfini $1 $2; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'delete_tmp_files; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
killprocess $iscsi_pid
|
||||
killprocess $record_pid
|
||||
|
@ -127,7 +127,7 @@ function vhost_kill()
|
||||
rm $testdir/vhost.pid || true
|
||||
}
|
||||
|
||||
trap "vhost_kill; rm -f $testdir/aio_bdev_0 $testdir/aio_bdev_1; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'vhost_kill; rm -f $testdir/aio_bdev_0 $testdir/aio_bdev_1; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
truncate -s 400M $testdir/aio_bdev_0 $testdir/aio_bdev_1
|
||||
vhost_start
|
||||
|
@ -197,7 +197,7 @@ function nvmfappstart()
|
||||
timing_enter start_nvmf_tgt
|
||||
$NVMF_APP $1 &
|
||||
nvmfpid=$!
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $nvmfpid
|
||||
timing_exit start_nvmf_tgt
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ timing_enter start_nvmf_tgt
|
||||
$NVMF_APP -m 0xF &
|
||||
nvmfpid=$!
|
||||
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
@ -21,7 +21,7 @@ timing_enter start_nvmf_tgt
|
||||
$NVMF_APP -m 0xF &
|
||||
nvmfpid=$!
|
||||
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
@ -18,7 +18,7 @@ timing_enter start_nvmf_tgt
|
||||
$NVMF_APP -m 0xF &
|
||||
nvmfpid=$!
|
||||
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
@ -14,7 +14,7 @@ timing_enter fuzz_test
|
||||
$NVMF_APP -m 0xF >$output_dir/nvmf_fuzz_tgt_output.txt 2>&1 &
|
||||
nvmfpid=$!
|
||||
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; rm -f $testdir/nvmf_fuzz.conf; killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; rm -f $testdir/nvmf_fuzz.conf; killprocess $nvmfpid; nvmftestfini $1; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
@ -29,7 +29,7 @@ $NVMF_APP -r $NVMF_SOCK &
|
||||
nvmfpid=$!
|
||||
waitforlisten $nvmfpid $NVMF_SOCK
|
||||
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
mkdir -p "$(get_vhost_dir 3)"
|
||||
|
||||
@ -37,7 +37,7 @@ $VHOST_APP -S "$(get_vhost_dir 3)" &
|
||||
vhostpid=$!
|
||||
waitforlisten $vhostpid $NVMF_SOCK
|
||||
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $vhostpid nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; killprocess $vhostpid nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
# Configure NVMF tgt on host machine
|
||||
malloc_bdev="$($NVMF_RPC construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"
|
||||
|
@ -116,7 +116,7 @@ waitforlisten $perfpid /var/tmp/bdevperf.sock
|
||||
$rpc_py -s /var/tmp/bdevperf.sock wait_subsystem_init
|
||||
|
||||
# Expand the trap to clean up bdevperf if something goes wrong
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; kill -9 $perfpid || true; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'process_shm --id $NVMF_APP_SHM_ID; kill -9 $perfpid || true; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforio /var/tmp/bdevperf.sock Nvme1n1
|
||||
|
||||
|
@ -18,7 +18,7 @@ function bdev_check_claimed()
|
||||
$rootdir/app/iscsi_tgt/iscsi_tgt &
|
||||
spdk_pid=$!
|
||||
|
||||
trap "killprocess $spdk_pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $spdk_pid; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $spdk_pid
|
||||
|
||||
|
@ -11,7 +11,7 @@ function start_spdk()
|
||||
{
|
||||
$rootdir/app/iscsi_tgt/iscsi_tgt &
|
||||
spdk_pid=$!
|
||||
trap "killprocess $spdk_pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $spdk_pid; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $spdk_pid
|
||||
}
|
||||
function stop_spdk()
|
||||
|
@ -50,7 +50,7 @@ killprocess $spdk_pid
|
||||
$rootdir/app/iscsi_tgt/iscsi_tgt -c $curdir/config &
|
||||
spdk_pid=$!
|
||||
|
||||
trap "killprocess $spdk_pid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $spdk_pid; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $spdk_pid
|
||||
|
||||
|
@ -19,13 +19,13 @@ $VHOST_APP >$output_dir/vhost_fuzz_tgt_output.txt 2>&1 &
|
||||
vhostpid=$!
|
||||
waitforlisten $vhostpid
|
||||
|
||||
trap "killprocess $vhostpid; exit 1" SIGINT SIGTERM exit
|
||||
trap 'killprocess $vhostpid; exit 1' SIGINT SIGTERM exit
|
||||
|
||||
$FUZZ_APP -t 10 2>$output_dir/vhost_fuzz_output1.txt &
|
||||
fuzzpid=$!
|
||||
waitforlisten $fuzzpid $FUZZ_RPC_SOCK
|
||||
|
||||
trap "killprocess $vhostpid; killprocess $fuzzpid; exit 1" SIGINT SIGTERM exit
|
||||
trap 'killprocess $vhostpid; killprocess $fuzzpid; exit 1' SIGINT SIGTERM exit
|
||||
|
||||
$vhost_rpc_py construct_malloc_bdev -b Malloc0 64 512
|
||||
$vhost_rpc_py construct_vhost_blk_controller Vhost.1 Malloc0
|
||||
@ -54,7 +54,7 @@ fuzzpid=$!
|
||||
waitforlisten $fuzzpid $FUZZ_RPC_SOCK
|
||||
|
||||
# re-evaluate fuzzpid
|
||||
trap "killprocess $vhostpid; killprocess $fuzzpid; exit 1" SIGINT SIGTERM exit
|
||||
trap 'killprocess $vhostpid; killprocess $fuzzpid; exit 1' SIGINT SIGTERM exit
|
||||
|
||||
$fuzz_specific_rpc_py fuzz_vhost_create_dev -s $(pwd)/Vhost.1 -b -v
|
||||
$fuzz_specific_rpc_py fuzz_vhost_create_dev -s $(pwd)/naa.VhostScsi0.1 -l -v
|
||||
|
@ -43,7 +43,7 @@ while getopts 'h-:' optchar; do
|
||||
esac
|
||||
done
|
||||
|
||||
trap "rm -f $aio_file; rm -rf $testdir/results; error_exit" SIGINT SIGTERM ERR
|
||||
trap 'rm -f $aio_file; rm -rf $testdir/results; error_exit' SIGINT SIGTERM ERR
|
||||
|
||||
mkdir -p $testdir/results
|
||||
dd if=/dev/zero of=$aio_file bs=1M count=512
|
||||
|
@ -43,7 +43,7 @@ if [ -d /usr/src/fio ]; then
|
||||
fi
|
||||
|
||||
$rootdir/test/app/bdev_svc/bdev_svc --wait-for-rpc & svcpid=$!
|
||||
trap "killprocess $svcpid; exit 1" SIGINT SIGTERM EXIT
|
||||
trap 'killprocess $svcpid; exit 1' SIGINT SIGTERM EXIT
|
||||
# Wait until bdev_svc starts
|
||||
waitforlisten $svcpid
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user