From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id EBF97C5F0 for ; Tue, 28 Jul 2015 02:55:09 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 27 Jul 2015 17:55:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,559,1432623600"; d="scan'208";a="771064209" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 27 Jul 2015 17:55:08 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6S0t65u025037; Tue, 28 Jul 2015 08:55:06 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t6S0t4J4007568; Tue, 28 Jul 2015 08:55:06 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6S0t4XN007564; Tue, 28 Jul 2015 08:55:04 +0800 From: Yong Liu To: dts@dpdk.org Date: Tue, 28 Jul 2015 08:55:03 +0800 Message-Id: <1438044903-7530-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] fix bug that vm_dut has no attribute Name X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2015 00:55:10 -0000 From: Marvin Liu Signed-off-by: Marvin Liu diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index 5df9675..fd4be20 100644 --- a/framework/qemu_kvm.py +++ b/framework/qemu_kvm.py @@ -1025,7 +1025,7 @@ class QEMUKvm(VirtBase): if not self.monitor_sock_path: self.host_logger.info( "No monitor between on host [ %s ] for guest [ %s ]" % - (self.host_dut.Name, self.vm_name)) + (self.host_dut.NAME, self.vm_name)) return None self.host_session.send_expect('nc -U %s' % self.monitor_sock_path, '(qemu)', 2) @@ -1045,10 +1045,14 @@ class QEMUKvm(VirtBase): pci_reg = r'^.*Bus(\s+)(\d+), device(\s+)(\d+), function (\d+)' id_reg = r'^.*id \"(.*)\"' + pcis = [] out = self.__monitor_session('info', 'pci') + + if out is None: + return pcis + lines = out.split("\r\n") - pcis = [] for line in lines: m = re.match(pci_reg, line) n = re.match(id_reg, line) @@ -1076,7 +1080,7 @@ class QEMUKvm(VirtBase): if not self.qga_sock_path: self.host_logger.info( "No QGA service between host [ %s ] and guest [ %s ]" % - (self.host_dut.Name, self.vm_name)) + (self.host_dut.NAME, self.vm_name)) return None cmd_head = '~/QMP/' + \ -- 1.9.3