From patchwork Mon Jul 20 15:07:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 36357 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 n6KF4JvE016769 for ; Mon, 20 Jul 2009 15:04:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752061AbZGTPDl (ORCPT ); Mon, 20 Jul 2009 11:03:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751813AbZGTPDl (ORCPT ); Mon, 20 Jul 2009 11:03:41 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59943 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752052AbZGTPDi (ORCPT ); Mon, 20 Jul 2009 11:03:38 -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 n6KF3cPa000633; Mon, 20 Jul 2009 11:03:38 -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 n6KF3bai025258; Mon, 20 Jul 2009 11:03:37 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6KF39lT007669; Mon, 20 Jul 2009 11:03:35 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 16/17] KVM test: initialize some VM attributes in __init__() to prevent trouble Date: Mon, 20 Jul 2009 18:07:23 +0300 Message-Id: In-Reply-To: References: <1248102444-31111-1-git-send-email-mgoldish@redhat.com> <4980fdb4f9630c89ba21bd4af49a3b7626fb29f1.1248102188.git.mgoldish@redhat.com> <747abbb55932d4fde553cf5187f7481aaced4d8c.1248102188.git.mgoldish@redhat.com> <53d7f316f181c7efb429e7b9f138ed3e8b239cce.1248102188.git.mgoldish@redhat.com> <7c14834269583764af3beb2e811ac62bec3a2c96.1248102188.git.mgoldish@redhat.com> <7f24fe107f3dc8e2693e12142ba97010c7063166.1248102188.git.mgoldish@redhat.com> <79d9f4e9e8ca62388f1a8be1a0f450a2f2329fc3.1248102188.git.mgoldish@redhat.com> <8cb328ac5429d808714dd252a456e6d3dd3a96b2.1248102188.git.mgoldish@redhat.com> In-Reply-To: References: 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 'redirs' and 'vnc_port' might be used before they're defined, if make_qemu_command() is called before create(). To make sure this doesn't happen, define them in the VM constructor. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_vm.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 8bc2403..d96b359 100644 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -112,6 +112,8 @@ class VM: @param iso_dir: The directory where ISOs reside """ self.process = None + self.redirs = {} + self.vnc_port = 5900 self.uuid = None self.name = name