From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2E8AA0512; Wed, 15 Jan 2020 10:07:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 32FEC1C0C5; Wed, 15 Jan 2020 10:07:00 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 354301BFC3 for ; Wed, 15 Jan 2020 10:06:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 01:06:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,322,1574150400"; d="scan'208";a="242810295" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 15 Jan 2020 01:06:58 -0800 From: Haiyang Zhao To: dts@dpdk.org Cc: zhaoyan.chen@intel.com, Haiyang Zhao Date: Wed, 15 Jan 2020 17:12:27 +0800 Message-Id: <1579079547-52758-5-git-send-email-haiyangx.zhao@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1579079547-52758-1-git-send-email-haiyangx.zhao@intel.com> References: <1579079547-52758-1-git-send-email-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V1 5/5] framework/virt_dut:optimize code 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.when out returned by self.tester.send_ping6 is None, it will raise an exception, and cause VM init failed, fixed it. *.fix pep8 issue. Signed-off-by: Haiyang Zhao --- framework/virt_dut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/virt_dut.py b/framework/virt_dut.py index a916b72..ebd48d8 100644 --- a/framework/virt_dut.py +++ b/framework/virt_dut.py @@ -411,7 +411,7 @@ class VirtDut(DPDKdut): out = self.tester.send_ping6( remotePort, ipv6, self.get_mac_address(vmPort)) - if ('64 bytes from' in out): + if out and '64 bytes from' in out: self.logger.info( "PORT MAP: [dut %d: tester %d]" % (vmPort, remotePort)) self.ports_map[vmPort] = remotePort -- 1.8.3.1