diff --git a/scripts/check_format.sh b/scripts/check_format.sh index 062388fb5..519ca15db 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -247,7 +247,7 @@ SC2027,SC2030,SC2031,SC2034,SC2035,SC2039,SC2043,SC2044,SC2045,SC2046,\ SC2068,SC2086,SC2089,SC2090,\ SC2097,SC2098,SC2103,SC2115,SC2116,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\ 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" # 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 diff --git a/scripts/setup.sh b/scripts/setup.sh index 68151c5ac..97f55771a 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -257,7 +257,7 @@ function configure_linux_pci { pci_dev_echo "$bdf" "Skipping un-whitelisted Virtio device at $bdf" continue fi - blknames='' + blknames=() get_virtio_names_from_bdf "$bdf" blknames for blkname in $blknames; do if [ "$(lsblk /dev/$blkname --output MOUNTPOINT -n | wc -w)" != "0" ]; then @@ -601,7 +601,7 @@ function status_linux { fi device=$(cat /sys/bus/pci/devices/$bdf/device) vendor=$(cat /sys/bus/pci/devices/$bdf/vendor) - blknames='' + 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" done diff --git a/test/nvme/perf/run_perf.sh b/test/nvme/perf/run_perf.sh index 8d8e49d88..655b7f33f 100755 --- a/test/nvme/perf/run_perf.sh +++ b/test/nvme/perf/run_perf.sh @@ -37,8 +37,8 @@ BASE_DIR=$(readlink -f $(dirname $0)) disk_names=$(get_disks $PLUGIN) disks_numa=$(get_numa_node $PLUGIN "$disk_names") cores=$(get_cores "$CPUS_ALLOWED") -no_cores=($cores) -no_cores=${#no_cores[@]} +no_cores_array=($cores) +no_cores=${#no_cores_array[@]} if $PRECONDITIONING; then HUGEMEM=8192 $ROOT_DIR/scripts/setup.sh diff --git a/test/vhost/perf_bench/vhost_perf.sh b/test/vhost/perf_bench/vhost_perf.sh index f42504085..0499d7cb6 100755 --- a/test/vhost/perf_bench/vhost_perf.sh +++ b/test/vhost/perf_bench/vhost_perf.sh @@ -190,8 +190,7 @@ if [[ $run_precondition == true ]]; then # Using the same precondition routine possible for lvols thanks # to --clear-method option. Lvols should not UNMAP on creation. $rootdir/scripts/gen_nvme.sh > $rootdir/nvme.cfg - nvmes=$(cat $rootdir/nvme.cfg | grep -oP "Nvme\d+") - nvmes=($nvmes) + mapfile -t nvmes < <(cat $rootdir/nvme.cfg | grep -oP "Nvme\d+") fio_filename=$(printf ":%sn1" "${nvmes[@]}") fio_filename=${fio_filename:1} $precond_fio_bin --name="precondition" \