test: Shellcheck - correct rule: Quotes/backslashes...

Correct shellcheck rule SC2089: Quotes/backslashes will be treated literally. Use an array.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I40d4eef334cd030294669f8e8494f9e7a563d495
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476466
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Maciej Wawryk 2019-12-02 12:29:25 +01:00 committed by Tomasz Zawadzki
parent 863bb94b24
commit 855dba2d97
2 changed files with 3 additions and 3 deletions

View File

@ -241,7 +241,7 @@ if hash shellcheck 2>/dev/null; then
# Error descriptions can also be found at: https://github.com/koalaman/shellcheck/wiki
# This SHCK_EXCLUDE list is out "to do" and we work to fix all of this errors.
SHCK_EXCLUDE="SC1083,SC2002,\
SC2010,SC2034,SC2045,SC2046,SC2086,SC2089,SC2090,\
SC2010,SC2034,SC2045,SC2046,SC2086,SC2090,\
SC2097,SC2098,SC2119,SC2120"
# 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

View File

@ -653,8 +653,8 @@ function configure_freebsd_pci {
GREP_STR="${GREP_STR}\|chip=0x${dev_id}8086"
done < $TMP
AWK_PROG="{if (count > 0) printf \",\"; printf \"%s:%s:%s\",\$2,\$3,\$4; count++}"
echo $AWK_PROG > $TMP
AWK_PROG=("{if (count > 0) printf \",\"; printf \"%s:%s:%s\",\$2,\$3,\$4; count++}")
echo "${AWK_PROG[*]}" > $TMP
BDFS=$(pciconf -l | grep "${GREP_STR}" | awk -F: -f $TMP)