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

test: Shellcheck - correct rule: Assigning an array to a string



Correct shellcheck rule SC2124: Assigning an array to a string!
Assign as array, or use * instead of @ to concatenate.

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


Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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 98c63be8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ if hash shellcheck 2>/dev/null; then
	# This SHCK_EXCLUDE list is out "to do" and we work to fix all of this errors.
	SHCK_EXCLUDE="SC1083,SC2002,\
SC2010,SC2012,SC2016,SC2034,SC2045,SC2046,SC2068,SC2086,SC2089,SC2090,\
SC2097,SC2098,SC2119,SC2120,SC2124,SC2126,SC2128,\
SC2097,SC2098,SC2119,SC2120,SC2126,SC2128,\
SC2129,SC2140,SC2142,SC2143,SC2154,SC2155,\
SC2162"
	# SPDK fails some error checks which have been deprecated in later versions of shellcheck.
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ done

shift "$((OPTIND-1))"   # Discard the options and sentinel --

SPDK_VAGRANT_DISTRO="$@"
SPDK_VAGRANT_DISTRO=( "$@" )

case "$SPDK_VAGRANT_DISTRO" in
	centos7)
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ export INSTALL_DEPS


shift "$((OPTIND-1))"   # Discard the options and sentinel --
SPDK_VAGRANT_DISTRO="$@"
SPDK_VAGRANT_DISTRO=( "$@" )

case "$SPDK_VAGRANT_DISTRO" in
	ubuntu16)
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ timing_enter nvmf_tgt

trap "exit 1" SIGINT SIGTERM EXIT

TEST_ARGS=$@
TEST_ARGS=( "$@" )

run_test suite test/nvmf/target/filesystem.sh $TEST_ARGS
run_test suite test/nvmf/target/discovery.sh $TEST_ARGS
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ function vhost_run()
		return 1
	fi

	local cmd="$vhost_app -r $vhost_dir/rpc.sock $@"
	local cmd="$vhost_app -r $vhost_dir/rpc.sock $*"

	notice "Loging to:   $vhost_log_file"
	notice "Socket:      $vhost_socket"