From 724357e6c3c417d05c46acc19f816815cc0ad301 Mon Sep 17 00:00:00 2001 From: Pawel Kaminski Date: Wed, 28 Aug 2019 08:20:41 -0400 Subject: [PATCH] test: Shellcheck - correct rule SC2235. Use { ..; } instead of (..) to avoid subshell overhead. Change-Id: Ifc62a154a40ad961f8295faae39da29077a0faf1 Signed-off-by: Pawel Kaminski Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466537 Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- scripts/check_format.sh | 2 +- test/vhost/common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index 878bb1f14..849d7bcf3 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -247,7 +247,7 @@ SC2068,SC2086,SC2089,SC2090,SC2091,SC2094,\ 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,SC2181,\ -SC2206,SC2207,SC2214,SC2223,SC2230,SC2231,SC2235" +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 # so that we can still run with older versions of shellcheck. diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 24d649795..a8a523acc 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -705,7 +705,7 @@ function vm_setup() fi # Create disk file if it not exist or it is smaller than 1G - if ( [[ -f $raw_disk ]] && [[ $(stat --printf="%s" $raw_disk) -lt $((1024 * 1024 * 1024)) ]] ) || \ + if { [[ -f $raw_disk ]] && [[ $(stat --printf="%s" $raw_disk) -lt $((1024 * 1024 * 1024)) ]]; } || \ [[ ! -e $raw_disk ]]; then if [[ $raw_disk =~ /dev/.* ]]; then error \