test/vhost: use vm_is_running in vm_shutdown_all
Fix test timeout. QEMU pid is leaking from one test run into another test run. This make test see random process with the same PID and skip running VM. Change-Id: I56940c55793535ab149c79775f5de284882ebd97 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/404476 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
bbe53581bd
commit
dd9d121da5
@ -464,7 +464,7 @@ function vm_shutdown_all()
|
||||
while [[ $timeo -gt 0 ]]; do
|
||||
local all_vms_down=1
|
||||
for vm in $vms; do
|
||||
if [[ -r $VM_BASE_DIR/$vm/qemu.pid ]] && pkill -0 -F "$VM_BASE_DIR/$vm/qemu.pid"; then
|
||||
if vm_is_running $vm; then
|
||||
all_vms_down=0
|
||||
break
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user