From: Yolkfull Chow Subject: [Autotest PATCH] KVM-test: subtest migrate: Use 'wait_for_login' to log into migrated guest Date: Thu, 21 Jan 2010 15:17:11 +0800 Message-ID: <1264058231-29462-1-git-send-email-yzhou@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: autotest@test.kernel.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org Using 'wait_for' for logging into migrated guest repeats the work of 'wait_for_login' which exists already. We just need to change the name of 'dest_vm'. Signed-off-by: Yolkfull Chow --- client/tests/kvm/kvm_test_utils.py | 1 + client/tests/kvm/tests/migration.py | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_test_utils.py b/client/tests/kvm/kvm_test_utils.py index 02ec0cf..13af8e1 100644 --- a/client/tests/kvm/kvm_test_utils.py +++ b/client/tests/kvm/kvm_test_utils.py @@ -135,6 +135,7 @@ def migrate(vm, env=None): # Clone the source VM and ask the clone to wait for incoming migration dest_vm = vm.clone() + dest_vm.name = "migrated_guest" dest_vm.create(for_migration=True) try: diff --git a/client/tests/kvm/tests/migration.py b/client/tests/kvm/tests/migration.py index b8f171c..b65064b 100644 --- a/client/tests/kvm/tests/migration.py +++ b/client/tests/kvm/tests/migration.py @@ -46,11 +46,8 @@ def run_migration(test, params, env): dest_vm = kvm_test_utils.migrate(vm, env) # Log into the guest again - logging.info("Logging into guest after migration...") - session2 = kvm_utils.wait_for(dest_vm.remote_login, 30, 0, 2) - if not session2: - raise error.TestFail("Could not log into guest after migration") - logging.info("Logged in after migration") + session2 = kvm_test_utils.wait_for_login(dest_vm, timeout=30, start=0, + step=2) # Make sure the background process is still running if session2.get_command_status(check_command, timeout=30) != 0: -- 1.6.6