diff --git a/scripts/check_format.sh b/scripts/check_format.sh index ee2ea19c5..ee2fc7c93 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -241,7 +241,7 @@ if hash shellcheck 2>/dev/null; then # Error descriptions can also be found at: https://github.com/koalaman/shellcheck/wiki SHCK_EXCLUDE="SC1001,SC1003,SC1004,SC1010,\ SC1083,SC1087,SC1090,SC1091,SC1113,SC2001,SC2002,SC2003,SC2004,SC2005,\ -SC2007,SC2009,SC2010,SC2012,SC2013,SC2015,SC2016,SC2018,SC2019,SC2022,SC2026,\ +SC2009,SC2010,SC2012,SC2013,SC2015,SC2016,SC2018,SC2019,SC2022,SC2026,\ SC2027,SC2030,SC2031,SC2034,SC2035,SC2039,SC2043,SC2044,SC2045,SC2046,SC2048,\ SC2059,SC2064,SC2068,SC2074,SC2086,SC2088,SC2089,SC2090,SC2091,SC2094,\ SC2097,SC2098,SC2103,SC2115,SC2116,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\ diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index bb88a1da6..bf1c11025 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -651,7 +651,7 @@ function waitforblk() local i=0 while ! lsblk -l -o NAME | grep -q -w $1; do [ $i -lt 15 ] || break - i=$[$i+1] + i=$((i+1)) sleep 1 done @@ -667,7 +667,7 @@ function waitforblk_disconnect() local i=0 while lsblk -l -o NAME | grep -q -w $1; do [ $i -lt 15 ] || break - i=$[$i+1] + i=$((i+1)) sleep 1 done @@ -683,7 +683,7 @@ function waitforfile() local i=0 while [ ! -e $1 ]; do [ $i -lt 200 ] || break - i=$[$i+1] + i=$((i+1)) sleep 0.1 done diff --git a/test/ftl/common.sh b/test/ftl/common.sh index 721bb6219..932ba2d66 100644 --- a/test/ftl/common.sh +++ b/test/ftl/common.sh @@ -21,13 +21,13 @@ function create_nv_cache_bdev() { local cache_bdf=$3 local num_punits=$4 - local bytes_to_mb=$[1024 * 1024] + local bytes_to_mb=$((1024 * 1024)) local chunk_size=$(get_chunk_size $ocssd_bdf) # We need at least 2 bands worth of data + 1 block - local size=$[2 * 4096 * $chunk_size * $num_punits + 1] + local size=$((2 * 4096 * $chunk_size * $num_punits + 1)) # Round the size up to the nearest megabyte - local size=$[($size + $bytes_to_mb) / $bytes_to_mb] + local size=$((($size + $bytes_to_mb) / $bytes_to_mb)) # Create NVMe bdev on specified device and split it so that it has the desired size local nvc_bdev=$($rootdir/scripts/rpc.py construct_nvme_bdev -b $name -t PCIe -a $cache_bdf) diff --git a/test/nvmf/target/multiconnection.sh b/test/nvmf/target/multiconnection.sh index 49fde0cc0..21273dab1 100755 --- a/test/nvmf/target/multiconnection.sh +++ b/test/nvmf/target/multiconnection.sh @@ -35,7 +35,7 @@ do done for i in $(seq 1 $NVMF_SUBSYS); do - k=$[$i-1] + k=$((i-1)) nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode${i}" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT" waitforblk "nvme${k}n1"