Commit 0169a18f authored by Jim Harris's avatar Jim Harris
Browse files

test/vhost: add VM_BASE_DIR to vm_shutdown_all checks



New vm_list_all function returns just vm numbers - with no
path.  vm_shutdown_all was not modified to add back the path,
so it would immediately think all VMs were shutdown when actually
they were not.

While here, fix a few other typos and nops.

Fixes db0c3174 (test/vhost: avoid setting nullglob's where possible)

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I43c58eac4dba3422cda34a2b8a02d174d4737f61

Reviewed-on: https://review.gerrithub.io/399951


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
parent 341a489a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -393,7 +393,7 @@ function vm_shutdown_all()
	local vm

	for vm in $vms; do
		vm_shutdown $(basename $vm)
		vm_shutdown $vm
	done

	notice "Waiting for VMs to shutdown..."
@@ -401,7 +401,7 @@ function vm_shutdown_all()
	while [[ $timeo -gt 0 ]]; do
		all_vms_down=1
		for vm in $vms; do
			if [[ -r $vm/qemu.pid ]] && pkill -0 -F "$vm/qemu.pid"; then
			if [[ -r $VM_BASE_DIR/$vm/qemu.pid ]] && pkill -0 -F "$VM_BASE_DIR/$vm/qemu.pid"; then
				all_vms_down=0
				break
			fi
@@ -418,7 +418,7 @@ function vm_shutdown_all()
	done

	$shell_restore_x
	error "Timout waiting for some VMs to shutdown"
	error "Timeout waiting for some VMs to shutdown"
	return 1
}

@@ -735,7 +735,7 @@ function vm_run()
			continue
		fi

		notice "running $VM_BASE_DIR$vm/run.sh"
		notice "running $VM_BASE_DIR/$vm/run.sh"
		if ! $VM_BASE_DIR/$vm/run.sh; then
			error "FAILED to run vm $vm"
			return 1