From 73c74528353205ea8b13cde86b652e6010dbd3a9 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Thu, 25 Jul 2019 14:45:20 +0200 Subject: [PATCH] test/vmd: fix 'if' syntax error Fixing errors reported by ShellCheck: SC1009: The mentioned syntax error was in this if expression. SC1073: Couldn't parse this test expression. Fix to allow more checks. SC1019: Expected this to be an argument to the unary condition. SC1020: You need a space before the ]. SC1072: Missing space before ]. Fix any mentioned problems and try again. Removing mentioned errors from check_format.sh exlusion list, as all of these errors should be tested for regularly. Change-Id: I19402baba7bb8e59ed707de97133bd0a579333cf Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463174 Tested-by: SPDK CI Jenkins Reviewed-by: Paul Luse Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- scripts/check_format.sh | 2 +- test/vmd/vmd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index df4ca7800..8cbaeb0ad 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -239,7 +239,7 @@ if hash shellcheck 2>/dev/null; then # For more information about the topic and a list of human-friendly error descripions # 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,SC1009,SC1010,SC1019,SC1020,SC1072,SC1073,\ + 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,\ SC2027,SC2030,SC2031,SC2034,SC2035,SC2039,SC2043,SC2044,SC2045,SC2046,SC2048,\ diff --git a/test/vmd/vmd.sh b/test/vmd/vmd.sh index 6e395b83b..ef09b22ef 100755 --- a/test/vmd/vmd.sh +++ b/test/vmd/vmd.sh @@ -9,7 +9,7 @@ rpc_py=$rootdir/scripts/rpc.py pci_devs=$($rootdir/app/spdk_lspci/spdk_lspci | grep "NVMe disk behind VMD" | awk '{print $1}') -if [ -z $pci_devs]; then +if [ -z $pci_devs ]; then echo "Couldn't find any NVMe device behind a VMD." exit 1 fi