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: Maciej 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: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Maciej Wawryk 2019-11-05 13:06:34 +01:00 committed by Jim Harris
parent 98c63be88f
commit e764b4ca5d
5 changed files with 5 additions and 5 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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"