test: Shellcheck - apply rule SC2178
Variable was used as an array but is now assigned a string. Change-Id: I79e59d80be96657a9c2fc66f9d205458f9db67b2 Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468366 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
This commit is contained in:
parent
7f0efebdf3
commit
119e911a0a
@ -247,7 +247,7 @@ SC2027,SC2030,SC2031,SC2034,SC2035,SC2039,SC2043,SC2044,SC2045,SC2046,\
|
|||||||
SC2068,SC2086,SC2089,SC2090,\
|
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,SC2146,SC2148,SC2152,SC2153,SC2154,SC2155,\
|
SC2129,SC2140,SC2142,SC2143,SC2145,SC2146,SC2148,SC2152,SC2153,SC2154,SC2155,\
|
||||||
SC2162,SC2164,SC2165,SC2166,SC2167,SC2174,SC2178,\
|
SC2162,SC2164,SC2165,SC2166,SC2167,SC2174,\
|
||||||
SC2206,SC2207,SC2214,SC2223,SC2230,SC2231"
|
SC2206,SC2207,SC2214,SC2223,SC2230,SC2231"
|
||||||
# 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.
|
||||||
# We will not try to fix these error checks, but instead just leave the error types here
|
# We will not try to fix these error checks, but instead just leave the error types here
|
||||||
|
@ -257,7 +257,7 @@ function configure_linux_pci {
|
|||||||
pci_dev_echo "$bdf" "Skipping un-whitelisted Virtio device at $bdf"
|
pci_dev_echo "$bdf" "Skipping un-whitelisted Virtio device at $bdf"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
blknames=''
|
blknames=()
|
||||||
get_virtio_names_from_bdf "$bdf" blknames
|
get_virtio_names_from_bdf "$bdf" blknames
|
||||||
for blkname in $blknames; do
|
for blkname in $blknames; do
|
||||||
if [ "$(lsblk /dev/$blkname --output MOUNTPOINT -n | wc -w)" != "0" ]; then
|
if [ "$(lsblk /dev/$blkname --output MOUNTPOINT -n | wc -w)" != "0" ]; then
|
||||||
@ -601,7 +601,7 @@ function status_linux {
|
|||||||
fi
|
fi
|
||||||
device=$(cat /sys/bus/pci/devices/$bdf/device)
|
device=$(cat /sys/bus/pci/devices/$bdf/device)
|
||||||
vendor=$(cat /sys/bus/pci/devices/$bdf/vendor)
|
vendor=$(cat /sys/bus/pci/devices/$bdf/vendor)
|
||||||
blknames=''
|
blknames=()
|
||||||
get_virtio_names_from_bdf "$bdf" blknames
|
get_virtio_names_from_bdf "$bdf" blknames
|
||||||
echo -e "$bdf\t${vendor#0x}\t${device#0x}\t$node\t\t${driver:--}\t\t$blknames"
|
echo -e "$bdf\t${vendor#0x}\t${device#0x}\t$node\t\t${driver:--}\t\t$blknames"
|
||||||
done
|
done
|
||||||
|
@ -37,8 +37,8 @@ BASE_DIR=$(readlink -f $(dirname $0))
|
|||||||
disk_names=$(get_disks $PLUGIN)
|
disk_names=$(get_disks $PLUGIN)
|
||||||
disks_numa=$(get_numa_node $PLUGIN "$disk_names")
|
disks_numa=$(get_numa_node $PLUGIN "$disk_names")
|
||||||
cores=$(get_cores "$CPUS_ALLOWED")
|
cores=$(get_cores "$CPUS_ALLOWED")
|
||||||
no_cores=($cores)
|
no_cores_array=($cores)
|
||||||
no_cores=${#no_cores[@]}
|
no_cores=${#no_cores_array[@]}
|
||||||
|
|
||||||
if $PRECONDITIONING; then
|
if $PRECONDITIONING; then
|
||||||
HUGEMEM=8192 $ROOT_DIR/scripts/setup.sh
|
HUGEMEM=8192 $ROOT_DIR/scripts/setup.sh
|
||||||
|
@ -190,8 +190,7 @@ if [[ $run_precondition == true ]]; then
|
|||||||
# Using the same precondition routine possible for lvols thanks
|
# Using the same precondition routine possible for lvols thanks
|
||||||
# to --clear-method option. Lvols should not UNMAP on creation.
|
# to --clear-method option. Lvols should not UNMAP on creation.
|
||||||
$rootdir/scripts/gen_nvme.sh > $rootdir/nvme.cfg
|
$rootdir/scripts/gen_nvme.sh > $rootdir/nvme.cfg
|
||||||
nvmes=$(cat $rootdir/nvme.cfg | grep -oP "Nvme\d+")
|
mapfile -t nvmes < <(cat $rootdir/nvme.cfg | grep -oP "Nvme\d+")
|
||||||
nvmes=($nvmes)
|
|
||||||
fio_filename=$(printf ":%sn1" "${nvmes[@]}")
|
fio_filename=$(printf ":%sn1" "${nvmes[@]}")
|
||||||
fio_filename=${fio_filename:1}
|
fio_filename=${fio_filename:1}
|
||||||
$precond_fio_bin --name="precondition" \
|
$precond_fio_bin --name="precondition" \
|
||||||
|
Loading…
Reference in New Issue
Block a user