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 6585EA3168 for ; Thu, 17 Oct 2019 09:31:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52EDD1E887; Thu, 17 Oct 2019 09:31:44 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 99C031E4E8 for ; Thu, 17 Oct 2019 09:31:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 00:31:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,306,1566889200"; d="scan'208";a="208583919" Received: from unknown (HELO dpdk-xiaoqimai-tester.sh.intel.com) ([10.240.179.35]) by fmsmga001.fm.intel.com with ESMTP; 17 Oct 2019 00:31:40 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Thu, 17 Oct 2019 03:29:50 -0400 Message-Id: <1571297390-82545-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V2] tests/bonding: fix save pcapfile method and path 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" fix save pcapfile method to new api Signed-off-by: Xiao Qimai --- tests/bonding.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/bonding.py b/tests/bonding.py index fb2a69e..6c136a3 100644 --- a/tests/bonding.py +++ b/tests/bonding.py @@ -36,7 +36,7 @@ import struct import socket from socket import htonl -from packet import Packet +from packet import Packet, TMP_PATH from scapy.sendrecv import sendp from scapy.utils import wrpcap @@ -181,14 +181,14 @@ class PmdBonding(object): # create packet streams = [] # keep a copy of pcap for debug - savePath = os.sep.join([self.target_source, + savePath = os.sep.join([TMP_PATH, "pkt_{0}.pcap".format(pkt_name)]) pkt_type = pkt_config.get('type') pkt_layers = pkt_config.get('pkt_layers') pkt = Packet(pkt_type=pkt_type.upper()) for layer in pkt_layers.keys(): pkt.config_layer(layer, pkt_layers[layer]) - pkt.pktgen.write_pcap(savePath) + pkt.save_pcapfile(filename=savePath) streams.append(pkt.pktgen.pkt) return streams @@ -228,14 +228,14 @@ class PmdBonding(object): streams = [] for values in pkt_configs: # keep a copy of pcap for debug - savePath = os.sep.join([self.target_source, + savePath = os.sep.join([TMP_PATH, "pkt_{0}.pcap".format(stm_name)]) pkt_type = values.get('type') pkt_layers = values.get('pkt_layers') pkt = Packet(pkt_type=pkt_type.upper()) for layer in pkt_layers.keys(): pkt.config_layer(layer, pkt_layers[layer]) - pkt.pktgen.write_pcap(savePath) + pkt.save_pcapfile(filename=savePath) streams.append(pkt.pktgen.pkt) return streams -- 1.8.3.1