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: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: I45102ead2e97cc1d6b11c21f269e58a235055c35 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470926 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:
parent
60bb3b3e2f
commit
7c4bb5e2c3
@ -243,7 +243,7 @@ if hash shellcheck 2>/dev/null; then
|
|||||||
SHCK_EXCLUDE="SC1083,SC2002,SC2004,\
|
SHCK_EXCLUDE="SC1083,SC2002,SC2004,\
|
||||||
SC2010,SC2012,SC2013,SC2016,SC2034,SC2045,SC2046,SC2068,SC2086,SC2089,SC2090,\
|
SC2010,SC2012,SC2013,SC2016,SC2034,SC2045,SC2046,SC2068,SC2086,SC2089,SC2090,\
|
||||||
SC2097,SC2098,SC2103,SC2115,SC2116,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\
|
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,\
|
SC2162,SC2164,SC2165,SC2166,SC2167,SC2174,\
|
||||||
SC2230"
|
SC2230"
|
||||||
# SPDK fails some error checks which have been deprecated in later versions of shellcheck.
|
# SPDK fails some error checks which have been deprecated in later versions of shellcheck.
|
||||||
|
@ -82,7 +82,7 @@ function pci_dev_echo() {
|
|||||||
local vendor="$(cat /sys/bus/pci/devices/$bdf/vendor)"
|
local vendor="$(cat /sys/bus/pci/devices/$bdf/vendor)"
|
||||||
local device="$(cat /sys/bus/pci/devices/$bdf/device)"
|
local device="$(cat /sys/bus/pci/devices/$bdf/device)"
|
||||||
shift
|
shift
|
||||||
echo "$bdf (${vendor#0x} ${device#0x}): $@"
|
echo "$bdf (${vendor#0x} ${device#0x}): $*"
|
||||||
}
|
}
|
||||||
|
|
||||||
function linux_bind_driver() {
|
function linux_bind_driver() {
|
||||||
|
@ -553,13 +553,13 @@ function run_test() {
|
|||||||
local test_type="$(echo $1 | tr '[:lower:]' '[:upper:]')"
|
local test_type="$(echo $1 | tr '[:lower:]' '[:upper:]')"
|
||||||
shift
|
shift
|
||||||
echo "************************************"
|
echo "************************************"
|
||||||
echo "START TEST $test_type $@"
|
echo "START TEST $test_type $*"
|
||||||
echo "************************************"
|
echo "************************************"
|
||||||
xtrace_restore
|
xtrace_restore
|
||||||
time "$@"
|
time "$@"
|
||||||
xtrace_disable
|
xtrace_disable
|
||||||
echo "************************************"
|
echo "************************************"
|
||||||
echo "END TEST $test_type $@"
|
echo "END TEST $test_type $*"
|
||||||
echo "************************************"
|
echo "************************************"
|
||||||
xtrace_restore
|
xtrace_restore
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ function message()
|
|||||||
|
|
||||||
local msg_type="$1"
|
local msg_type="$1"
|
||||||
shift
|
shift
|
||||||
echo -e "${msg_type}${verbose_out}: $@"
|
echo -e "${msg_type}${verbose_out}: $*"
|
||||||
}
|
}
|
||||||
|
|
||||||
function fail()
|
function fail()
|
||||||
|
@ -183,7 +183,7 @@ else
|
|||||||
fi
|
fi
|
||||||
notice "Preparing NVMe setup..."
|
notice "Preparing NVMe setup..."
|
||||||
notice "Using $max_disks physical NVMe drives"
|
notice "Using $max_disks physical NVMe drives"
|
||||||
notice "Nvme split list: ${splits[@]}"
|
notice "Nvme split list: ${splits[*]}"
|
||||||
|
|
||||||
# ===== Precondition NVMes if specified =====
|
# ===== Precondition NVMes if specified =====
|
||||||
if [[ $run_precondition == true ]]; then
|
if [[ $run_precondition == true ]]; then
|
||||||
|
@ -11,7 +11,7 @@ test_file_name="some_test_file"
|
|||||||
function error()
|
function error()
|
||||||
{
|
{
|
||||||
echo "==========="
|
echo "==========="
|
||||||
echo -e "ERROR: $@"
|
echo -e "ERROR: $*"
|
||||||
echo "==========="
|
echo "==========="
|
||||||
trap - ERR
|
trap - ERR
|
||||||
set +e
|
set +e
|
||||||
|
@ -11,7 +11,7 @@ test_file_name="some_test_file"
|
|||||||
function error()
|
function error()
|
||||||
{
|
{
|
||||||
echo "==========="
|
echo "==========="
|
||||||
echo -e "ERROR: $@"
|
echo -e "ERROR: $*"
|
||||||
echo "==========="
|
echo "==========="
|
||||||
trap - ERR
|
trap - ERR
|
||||||
set +e
|
set +e
|
||||||
|
@ -11,7 +11,7 @@ test_file_name="some_test_file"
|
|||||||
function error()
|
function error()
|
||||||
{
|
{
|
||||||
echo "==========="
|
echo "==========="
|
||||||
echo -e "ERROR: $@"
|
echo -e "ERROR: $*"
|
||||||
echo "==========="
|
echo "==========="
|
||||||
umount "$test_folder_name"
|
umount "$test_folder_name"
|
||||||
rm -rf "$testdir/$test_folder_name"
|
rm -rf "$testdir/$test_folder_name"
|
||||||
|
Loading…
Reference in New Issue
Block a user