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 55B5FA3168 for ; Wed, 16 Oct 2019 11:42:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 47CDD1E8B7; Wed, 16 Oct 2019 11:42:43 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 583EA1E551 for ; Wed, 16 Oct 2019 11:42:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 02:42:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,303,1566889200"; d="scan'208";a="279477105" Received: from unknown (HELO dpdk-xiaoqimai-tester.sh.intel.com) ([10.240.179.35]) by orsmga001.jf.intel.com with ESMTP; 16 Oct 2019 02:42:39 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Wed, 16 Oct 2019 05:40:53 -0400 Message-Id: <1571218853-20488-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1] 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..68a3287 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(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(savePath) streams.append(pkt.pktgen.pkt) return streams -- 1.8.3.1