From eda1ec69325dc6c927ad9eed57a7b936654f1c79 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Tue, 1 Oct 2019 12:40:07 -0700 Subject: [PATCH] vhost: fix vm_wait_for_boot arg check. This was changed recently to enable a shell coding style checker, but $* does not represent the number of arguments supplied to the function, rather it is an alternative version of $@ that stores all arguments in a single string. So we should be checking against an empty string and not 0. By checking against 0, every time we passed 0 into vm_wait_for_boot, we tried booting every vm in that directory. This causes errors on nightly tests and intermittent failures during per-patch testing. Change-Id: I1850ea73ea59fdc244de1a91e4c6de1b4505e518 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470087 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- test/vhost/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/vhost/common.sh b/test/vhost/common.sh index a8a523acc..dd0b39c2a 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -899,7 +899,7 @@ function vm_wait_for_boot() notice "Waiting for VMs to boot" shift - if [[ "$*" == 0 ]]; then + if [[ "$*" == "" ]]; then local vms_to_check="$VM_DIR/[0-9]*" else local vms_to_check=""