Commit 7c4bb5e2 authored by Maciej Wawryk's avatar Maciej Wawryk Committed by Jim Harris
Browse files

test: Shellcheck - correct rule: Argument mixes string and array



Correct shellcheck rule SC2145: Argument mixes string and
array. Use * or separate argument.

Signed-off-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I45102ead2e97cc1d6b11c21f269e58a235055c35
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470926


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>
parent 60bb3b3e
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
	SHCK_EXCLUDE="SC1083,SC2002,SC2004,\
SC2010,SC2012,SC2013,SC2016,SC2034,SC2045,SC2046,SC2068,SC2086,SC2089,SC2090,\
SC2097,SC2098,SC2103,SC2115,SC2116,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\
SC2129,SC2140,SC2142,SC2143,SC2145,SC2148,SC2152,SC2153,SC2154,SC2155,\
SC2129,SC2140,SC2142,SC2143,SC2148,SC2152,SC2153,SC2154,SC2155,\
SC2162,SC2164,SC2165,SC2166,SC2167,SC2174,\
SC2230"
	# SPDK fails some error checks which have been deprecated in later versions of shellcheck.
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ function pci_dev_echo() {
	local vendor="$(cat /sys/bus/pci/devices/$bdf/vendor)"
	local device="$(cat /sys/bus/pci/devices/$bdf/device)"
	shift
	echo "$bdf (${vendor#0x} ${device#0x}): $@"
	echo "$bdf (${vendor#0x} ${device#0x}): $*"
}

function linux_bind_driver() {
+2 −2
Original line number Diff line number Diff line
@@ -553,13 +553,13 @@ function run_test() {
	local test_type="$(echo $1 | tr '[:lower:]' '[:upper:]')"
	shift
	echo "************************************"
	echo "START TEST $test_type $@"
	echo "START TEST $test_type $*"
	echo "************************************"
	xtrace_restore
	time "$@"
	xtrace_disable
	echo "************************************"
	echo "END TEST $test_type $@"
	echo "END TEST $test_type $*"
	echo "************************************"
	xtrace_restore
}
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ function message()

	local msg_type="$1"
	shift
	echo -e "${msg_type}${verbose_out}: $@"
	echo -e "${msg_type}${verbose_out}: $*"
}

function fail()
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ else
fi
notice "Preparing NVMe setup..."
notice "Using $max_disks physical NVMe drives"
notice "Nvme split list: ${splits[@]}"
notice "Nvme split list: ${splits[*]}"

# ===== Precondition NVMes if specified =====
if [[ $run_precondition == true ]]; then
Loading