From dd9d121da51056f7567a6372fedae31c5da794f4 Mon Sep 17 00:00:00 2001 From: Pawel Wodkowski Date: Tue, 20 Mar 2018 14:27:51 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/404476 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Dariusz Stojaczyk Reviewed-by: Karol Latecki Reviewed-by: Tomasz Zawadzki --- test/vhost/common/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/vhost/common/common.sh b/test/vhost/common/common.sh index a50f8e2e2..63776c239 100644 --- a/test/vhost/common/common.sh +++ b/test/vhost/common/common.sh @@ -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