From patchwork Mon Jan 3 18:27:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 448621 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p03IRBb2024206 for ; Mon, 3 Jan 2011 18:27:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752557Ab1ACS1E (ORCPT ); Mon, 3 Jan 2011 13:27:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26231 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752365Ab1ACS1D (ORCPT ); Mon, 3 Jan 2011 13:27:03 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p03IR2VI025454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 3 Jan 2011 13:27:02 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p03IR1Ed017305; Mon, 3 Jan 2011 13:27:01 -0500 Received: from moof.tlv.redhat.com (dhcp-1-185.tlv.redhat.com [10.35.1.185]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p03IQeWh027298; Mon, 3 Jan 2011 13:27:00 -0500 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 15/17] KVM test: use VM.migrate() instead of kvm_test_utils.migrate() Date: Mon, 3 Jan 2011 20:27:16 +0200 Message-Id: <1294079238-21239-15-git-send-email-mgoldish@redhat.com> In-Reply-To: <1294079238-21239-1-git-send-email-mgoldish@redhat.com> References: <1294079238-21239-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 03 Jan 2011 18:27:13 +0000 (UTC) diff --git a/client/tests/kvm/tests/migration.py b/client/tests/kvm/tests/migration.py index 76cbcfc..d6dc1b0 100644 --- a/client/tests/kvm/tests/migration.py +++ b/client/tests/kvm/tests/migration.py @@ -26,7 +26,7 @@ def run_migration(test, params, env): mig_timeout = float(params.get("mig_timeout", "3600")) mig_protocol = params.get("migration_protocol", "tcp") - mig_cancel = bool(params.get("mig_cancel")) + mig_cancel_delay = int(params.get("mig_cancel") == "yes") * 2 offline = params.get("offline", "no") == "yes" check = params.get("vmstate_check", "no") == "yes" @@ -49,12 +49,11 @@ def run_migration(test, params, env): session2.close() # Migrate the VM - dest_vm = kvm_test_utils.migrate(vm, env,mig_timeout, mig_protocol, - mig_cancel, offline, check) + vm.migrate(mig_timeout, mig_protocol, mig_cancel_delay, offline, check) # Log into the guest again logging.info("Logging into guest after migration...") - session2 = dest_vm.wait_for_login(timeout=30) + session2 = vm.wait_for_login(timeout=30) logging.info("Logged in after migration") # Make sure the background process is still running diff --git a/client/tests/kvm/tests/migration_multi_host.py b/client/tests/kvm/tests/migration_multi_host.py index 12d70ef..7647af4 100644 --- a/client/tests/kvm/tests/migration_multi_host.py +++ b/client/tests/kvm/tests/migration_multi_host.py @@ -67,8 +67,7 @@ def run_migration_multi_host(test, params, env): c_socket.close() logging.info("Start migrating now...") - kvm_test_utils.migrate(vm=vm, dest_host=dsthost, mig_port=mig_port, - env=env) + vm.migrate(dest_host=dsthost, remote_port=mig_port) # Wait up to 30 seconds for dest to reach this point test.job.barrier(srchost, 'mig_finished', 30).rendezvous(srchost, diff --git a/client/tests/kvm/tests/timedrift_with_migration.py b/client/tests/kvm/tests/timedrift_with_migration.py index b8d3e6c..66e8fde 100644 --- a/client/tests/kvm/tests/timedrift_with_migration.py +++ b/client/tests/kvm/tests/timedrift_with_migration.py @@ -48,7 +48,7 @@ def run_timedrift_with_migration(test, params, env): # Run current iteration logging.info("Migrating: iteration %d of %d..." % (i + 1, migration_iterations)) - vm = kvm_test_utils.migrate(vm, env) + vm.migrate() # Log in logging.info("Logging in after migration...") session = vm.wait_for_login(timeout=30)