From patchwork Tue Jun 9 00:34:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 28781 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n590Z3dM011561 for ; Tue, 9 Jun 2009 00:35:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754831AbZFIAe6 (ORCPT ); Mon, 8 Jun 2009 20:34:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754759AbZFIAe6 (ORCPT ); Mon, 8 Jun 2009 20:34:58 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43866 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754561AbZFIAe6 (ORCPT ); Mon, 8 Jun 2009 20:34:58 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n590Z0S9000376; Mon, 8 Jun 2009 20:35:00 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n590YxB6010954; Mon, 8 Jun 2009 20:34:59 -0400 Received: from localhost.localdomain (vpn-10-92.bos.redhat.com [10.16.10.92]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n590Yqdr011766; Mon, 8 Jun 2009 20:34:58 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues , Michael Goldish Subject: [KVM-AUTOTEST PATCH 04/06] VM.create(): always destroy() the VM before attempting to start it Date: Mon, 8 Jun 2009 21:34:49 -0300 Message-Id: <1244507691-9575-4-git-send-email-lmr@redhat.com> In-Reply-To: <1244507691-9575-3-git-send-email-lmr@redhat.com> References: <1244507691-9575-1-git-send-email-lmr@redhat.com> <1244507691-9575-2-git-send-email-lmr@redhat.com> <1244507691-9575-3-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Also, don't do it in kvm_preprocessing.py since it's now done in kvm_vm.py. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_preprocessing.py | 1 - client/tests/kvm/kvm_vm.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index e395d98..f60cfe8 100644 --- a/client/tests/kvm/kvm_preprocessing.py +++ b/client/tests/kvm/kvm_preprocessing.py @@ -80,7 +80,6 @@ def preprocess_vm(test, params, env, name): start_vm = True if start_vm: - vm.destroy() if not vm.create(name, params, qemu_path, image_dir, iso_dir, for_migration): message = "Could not start VM" diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 6de3989..d7b0735 100644 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -303,6 +303,8 @@ class VM: @param for_migration: If True, start the VM with the -incoming option """ + self.destroy() + if name != None: self.name = name if params != None: