Commit eda1ec69 authored by Seth Howell's avatar Seth Howell Committed by Ben Walker
Browse files

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: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470087


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 338fcaac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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=""