From patchwork Fri Jan 7 18:48:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 465021 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 p07ImGtH012422 for ; Fri, 7 Jan 2011 18:48:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754057Ab1AGSsE (ORCPT ); Fri, 7 Jan 2011 13:48:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25809 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753991Ab1AGSsA (ORCPT ); Fri, 7 Jan 2011 13:48:00 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p07Im0QI011843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jan 2011 13:48:00 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p07Ilxla013477; Fri, 7 Jan 2011 13:47:59 -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 p07IlkZQ032671; Fri, 7 Jan 2011 13:47:58 -0500 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH v3 10/11] KVM test: use error.context() in VM.migrate() Date: Fri, 7 Jan 2011 20:48:10 +0200 Message-Id: <1294426091-16704-10-git-send-email-mgoldish@redhat.com> In-Reply-To: <1294426091-16704-1-git-send-email-mgoldish@redhat.com> References: <1294426091-16704-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 07 Jan 2011 18:48:17 +0000 (UTC) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 6f494eb..259bb18 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -1357,6 +1357,7 @@ class VM: return self.serial_login(internal_timeout) + @error.context_aware def migrate(self, timeout=3600, protocol="tcp", cancel_delay=None, offline=False, stable_check=False, clean=True, save_path="/tmp", dest_host="localhost", remote_port=None): @@ -1381,6 +1382,8 @@ class VM: @param dest_host: Destination host (defaults to 'localhost'). @param remote_port: Port to use for remote migration. """ + error.base_context("migrating '%s'" % self.name) + def mig_finished(): o = self.monitor.info("migrate") if isinstance(o, str): @@ -1421,11 +1424,13 @@ class VM: clone = self.clone() if local: + error.context("creating destination VM") if stable_check: # Pause the dest vm after creation extra_params = clone.params.get("extra_params", "") + " -S" clone.params["extra_params"] = extra_params clone.create(migration_mode=protocol, mac_source=self) + error.context() try: if protocol == "tcp":