From 5333a632cee592b4a03c5c81d8ed792888d2b259 Mon Sep 17 00:00:00 2001 From: Pawel Wodkowski Date: Mon, 5 Mar 2018 15:21:21 +0100 Subject: [PATCH] test/migration: debug VM shutdown issue Although migration successfully end Test Case 1 fail because of some VM shutdown issue. This look like test issue. Temporarily increase verbosity in vm_shutdown function to debug this issue. Change-Id: I3d54775b2e4e7286bd86359a7ac5ca2a9d8ad750 Signed-off-by: Pawel Wodkowski Reviewed-on: https://review.gerrithub.io/402531 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- test/vhost/common/common.sh | 7 ++++--- test/vhost/migration/migration-tc1.sh | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/vhost/common/common.sh b/test/vhost/common/common.sh index 27761ae67..a50f8e2e2 100644 --- a/test/vhost/common/common.sh +++ b/test/vhost/common/common.sh @@ -449,7 +449,8 @@ function vm_kill_all() function vm_shutdown_all() { local shell_restore_x="$( [[ "$-" =~ x ]] && echo 'set -x' )" - set +x + # XXX: temporally disable to debug shutdown issue + # set +x local vms=$(vm_list_all) local vm @@ -459,9 +460,9 @@ function vm_shutdown_all() done notice "Waiting for VMs to shutdown..." - timeo=15 + local timeo=15 while [[ $timeo -gt 0 ]]; do - all_vms_down=1 + 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 all_vms_down=0 diff --git a/test/vhost/migration/migration-tc1.sh b/test/vhost/migration/migration-tc1.sh index c69c5b77b..a86301522 100644 --- a/test/vhost/migration/migration-tc1.sh +++ b/test/vhost/migration/migration-tc1.sh @@ -39,6 +39,8 @@ function migration_tc1_configure_vhost() function migration_tc1_error_handler() { trap - SIGINT ERR EXIT + warning "Migration TC1 ERROR HANDLER" + print_backtrace set -x vm_kill_all