Commit 90c84ec5 authored by Karol Latecki's avatar Karol Latecki Committed by Jim Harris
Browse files

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: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464655


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
parent 0aa72ffb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,\
+2 −2
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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
+3 −3
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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')
Loading