test/common: fix use braces

Fix SC1087: Use braces when expanding arrays,
e.g. ${array[idx]} (or ${var}[.. to quiet).

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I0ffa91da9847ee0805b664cba573346ab5b83f3a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466898
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Maciej Wawryk 2019-08-30 11:20:40 +02:00 committed by Jim Harris
parent 24eb7a84b0
commit 54ad489a53
2 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ if hash shellcheck 2>/dev/null; then
# go to: https://trello.com/c/29Z90j1W
# 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,\
SC1083,SC1090,SC1091,SC1113,SC2001,SC2002,SC2003,SC2004,SC2005,\
SC2009,SC2010,SC2012,SC2013,SC2015,SC2016,SC2018,SC2019,SC2022,SC2026,\
SC2027,SC2030,SC2031,SC2034,SC2035,SC2039,SC2043,SC2044,SC2045,SC2046,SC2048,\
SC2059,SC2068,SC2074,SC2086,SC2088,SC2089,SC2090,SC2091,SC2094,\

View File

@ -549,7 +549,7 @@ function print_backtrace() {
local src="${BASH_SOURCE[$i]}"
echo "in $src:$line_nr -> $func()"
echo " ..."
nl -w 4 -ba -nln $src | grep -B 5 -A 5 "^$line_nr[^0-9]" | \
nl -w 4 -ba -nln $src | grep -B 5 -A 5 "^${line_nr}[^0-9]" | \
sed "s/^/ /g" | sed "s/^ $line_nr /=> $line_nr /g"
echo " ..."
done