From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CB6D75A83 for ; Thu, 12 Feb 2015 09:09:32 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 12 Feb 2015 00:09:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,564,1418112000"; d="scan'208";a="665275638" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 12 Feb 2015 00:09:30 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t1C89SGk030828; Thu, 12 Feb 2015 16:09:28 +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 t1C89Qe7014849; Thu, 12 Feb 2015 16:09:28 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t1C89Qte014845; Thu, 12 Feb 2015 16:09:26 +0800 From: Yong Liu To: dts@dpdk.org Date: Thu, 12 Feb 2015 16:09:08 +0800 Message-Id: <1423728550-14792-4-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1423728550-14792-1-git-send-email-yong.liu@intel.com> References: <1423728550-14792-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH 3/5] framework: seperate killl scapy and kill DPDK application in kill_all function 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: Thu, 12 Feb 2015 08:09:33 -0000 Signed-off-by: Marvinliu --- framework/tester.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/framework/tester.py b/framework/tester.py index 68fec69..bdd039a 100644 --- a/framework/tester.py +++ b/framework/tester.py @@ -148,6 +148,12 @@ class Tester(Crb): """ return self.ports_info[self.get_local_port(remotePort)]['type'] + def get_pci(self, localPort): + """ + Return tester local port pci id. + """ + return self.ports_info[localPort]['pci'] + def get_interface(self, localPort): """ Return tester local port interface name. @@ -250,7 +256,7 @@ class Tester(Crb): Send ping6 packet from local port with destination ipv6 address. """ if self.ports_info[localPort]['type'] == 'ixia': - return self.ixia_packet_gen.send_ping6(self.ports_info[localPort]['intf'], mac, ipv6) + return self.ixia_packet_gen.send_ping6(self.ports_info[localPort]['pci'], mac, ipv6) else: return self.send_expect("ping6 -w 5 -c 5 -A -I %s %s" % (self.ports_info[localPort]['intf'], ipv6), "# ", 10) @@ -449,13 +455,13 @@ class Tester(Crb): instance.__dict__ = self.ixia_packet_gen.__dict__ instance.__dict__.update(current_attrs) - def kill_all(self): + def kill_all(self, killall=False): """ - Kill all scapy process and DPDK applications on tester. + Kill all scapy process or DPDK application on tester. """ if not self.has_external_traffic_generator(): self.alt_session.send_expect('killall scapy 2>/dev/null; echo tester', '# ', 5) - else: + if killall: super(Tester, self).kill_all() def close(self): -- 1.9.3