From 17b26b76907fa098fe8fa4648645083676404207 Mon Sep 17 00:00:00 2001 From: Maciej Wawryk Date: Tue, 5 Nov 2019 14:31:51 +0100 Subject: [PATCH] test: Shellcheck - correct rule: Word is on the form... Correct shellcheck rule SC2140: Word is on the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"? Signed-off-by: Maciej Wawryk Change-Id: I1655b2e76be7a5e3d615c5b34c5af9e4012ac49f Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473291 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Shuhei Matsumoto --- scripts/check_format.sh | 2 +- test/vhost/migration/migration-tc3a.sh | 2 +- test/vhost/readonly/enabled_readonly_vm.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index 01a7e0378e..4efacb3a6d 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -243,7 +243,7 @@ if hash shellcheck 2>/dev/null; then SHCK_EXCLUDE="SC1083,SC2002,\ SC2010,SC2012,SC2016,SC2034,SC2045,SC2046,SC2068,SC2086,SC2089,SC2090,\ SC2097,SC2098,SC2119,SC2120,SC2128,\ -SC2129,SC2140,SC2142,SC2143" +SC2129,SC2142,SC2143" # 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/migration/migration-tc3a.sh b/test/vhost/migration/migration-tc3a.sh index 445fce382f..0824383a30 100644 --- a/test/vhost/migration/migration-tc3a.sh +++ b/test/vhost/migration/migration-tc3a.sh @@ -157,7 +157,7 @@ function host_1_create_share() mkdir -p $VM_BASE_DIR # This dir would've been created later but we need it now rm -rf $share_dir/spdk.tar.gz $share_dir/spdk || true cp $os_image $share_dir/migration.qcow2 - tar --exclude="*.o"--exclude="*.d" --exclude="*.git" -C $rootdir -zcf $share_dir/spdk.tar.gz . + tar --exclude="*.o" --exclude="*.d" --exclude="*.git" -C $rootdir -zcf $share_dir/spdk.tar.gz . } function host_2_create_share() diff --git a/test/vhost/readonly/enabled_readonly_vm.sh b/test/vhost/readonly/enabled_readonly_vm.sh index 75369da663..29be1e4ce1 100755 --- a/test/vhost/readonly/enabled_readonly_vm.sh +++ b/test/vhost/readonly/enabled_readonly_vm.sh @@ -27,7 +27,7 @@ if (( $(lsblk -r -n -o RO -d "/dev/$disk_name") == 0 )); then fi echo "INFO: Found vhost-blk disk with readonly flag" -if [[ ! -b "/dev/$disk_name"1"" ]]; then +if [[ ! -b "/dev/${disk_name}1" ]]; then error "Partition not found!" fi