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,\
|
||||
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.
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -11,7 +11,7 @@ test_file_name="some_test_file"
|
||||
function error()
|
||||
{
|
||||
echo "==========="
|
||||
echo -e "ERROR: $@"
|
||||
echo -e "ERROR: $*"
|
||||
echo "==========="
|
||||
trap - ERR
|
||||
set +e
|
||||
|
@ -11,7 +11,7 @@ test_file_name="some_test_file"
|
||||
function error()
|
||||
{
|
||||
echo "==========="
|
||||
echo -e "ERROR: $@"
|
||||
echo -e "ERROR: $*"
|
||||
echo "==========="
|
||||
trap - ERR
|
||||
set +e
|
||||
|
@ -11,7 +11,7 @@ test_file_name="some_test_file"
|
||||
function error()
|
||||
{
|
||||
echo "==========="
|
||||
echo -e "ERROR: $@"
|
||||
echo -e "ERROR: $*"
|
||||
echo "==========="
|
||||
umount "$test_folder_name"
|
||||
rm -rf "$testdir/$test_folder_name"
|
||||
|
Loading…
Reference in New Issue
Block a user