test suite reviews and discussions
 help / color / mirror / Atom feed
From: Phil Yang <phil.yang@arm.com>
To: dts@dpdk.org
Cc: nd@arm.com, yong.liu@intel.com
Subject: [dts] [PATCH v2 02/17] tests/checksum_offload: Replace sniff_packet to tester.tcpdump_sniff_packet
Date: Fri, 30 Mar 2018 18:40:54 +0800	[thread overview]
Message-ID: <1522406469-9251-2-git-send-email-phil.yang@arm.com> (raw)
In-Reply-To: <1522406469-9251-1-git-send-email-phil.yang@arm.com>

Make sniff_packet running on the tester. Create a ssh connection to the
tester then call tcpdump.

Signed-off-by: Phil Yang <phil.yang@arm.com>
---
 tests/TestSuite_checksum_offload.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 2ff5c2f..aa43263 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -43,7 +43,6 @@ import utils
 
 from test_case import TestCase
 from pmd_output import PmdOutput
-from packet import Packet, sniff_packets, load_sniff_packets, strip_pktload
 from test_capabilities import DRIVER_TEST_LACK_CAPA
 
 class TestChecksumOffload(TestCase):
@@ -175,13 +174,15 @@ class TestChecksumOffload(TestCase):
 
         self.tester.send_expect("exit()", "#")
 
-        inst = sniff_packets(intf=rx_interface, count=len(packets_sent), filters=[{'layer':'ether', 'config':{'src': sniff_src}}])
+        inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent),
+                filters=[{'layer':'ether', 'config':{'src': sniff_src}}])
 
         for packet_type in packets_sent.keys():
             self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface))
 
         self.tester.scapy_execute()
-	p = load_sniff_packets(inst)
+        self.tester.session.copy_file_from("/tmp/sniff_%s.pcap" % self.rx_interface, "/tmp/")
+	p = self.tester.load_tcpdump_sniff_packets(inst)
 	nr_packets=len(p)
 	reslist = [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]
 	out = string.join(reslist, ",")
-- 
2.7.4

  reply	other threads:[~2018-03-30 10:41 UTC|newest]

Thread overview: 124+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  8:03 [dts] [PATCH 01/17] framwork/packet: Add sniff_packet specify running Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 02/17] tests/checksum_offload: Replaced sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 03/17] tests/etag: " Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 04/17] tests/ipfrag: " Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 05/17] tests/l2fwd_crypto: Replaced sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 06/17] tests/netmap_compat: Replaced sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 07/17] tests/queue_start_stop: Replaced sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 08/17] tests/quota_watermark: " Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 09/17] tests/rxtx_callback: " Phil Yang
2018-03-23  8:03 ` [dts] [PATCH 10/17] tests/scatter: " Phil Yang
2018-03-23  8:04 ` [dts] [PATCH 11/17] tests/keleton: " Phil Yang
2018-03-23  8:04 ` [dts] [PATCH 12/17] tests/userspace_ethtool: " Phil Yang
2018-03-23  8:04 ` [dts] [PATCH 13/17] tests/vf_daemon: " Phil Yang
2018-03-23  8:04 ` [dts] [PATCH 14/17] tests/vf_vlan: " Phil Yang
2018-03-23  8:04 ` [dts] [PATCH 15/17] tests/vlan_ethertype_config: " Phil Yang
2018-03-23  8:04 ` [dts] [PATCH 16/17] tests/vlan: " Phil Yang
2018-03-23  8:04 ` [dts] [PATCH 17/17] tests/ipgre: " Phil Yang
2018-03-28  2:41 ` [dts] [PATCH 01/17] framwork/packet: Add sniff_packet specify running Liu, Yong
2018-03-28  6:34   ` Phil Yang
2018-03-29  2:31     ` Liu, Yong
2018-03-29  2:35       ` Phil Yang
2018-03-30 10:40 ` [dts] [PATCH v2 01/17] framwork/packet: sniff_packet specify running target support Phil Yang
2018-03-30 10:40   ` Phil Yang [this message]
2018-03-30 10:40   ` [dts] [PATCH v2 03/17] tests/etag: Replace sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-03-30 10:40   ` [dts] [PATCH v2 04/17] tests/ipfrag: " Phil Yang
2018-03-30 10:40   ` [dts] [PATCH v2 05/17] tests/l2fwd_crypto: Replace sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-03-30 10:40   ` [dts] [PATCH v2 06/17] tests/netmap_compat: Replace sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-03-30 10:40   ` [dts] [PATCH v2 07/17] tests/queue_start_stop: Replace sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 08/17] tests/quota_watermark: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 09/17] tests/rxtx_callback: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 10/17] tests/scatter: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 11/17] tests/skeleton: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 12/17] tests/userspace_ethtool: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 13/17] tests/vf_daemon: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 14/17] tests/vf_vlan: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 15/17] tests/vlan_ethertype_config: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 16/17] tests/vlan: " Phil Yang
2018-03-30 10:41   ` [dts] [PATCH v2 17/17] tests/ipgre: " Phil Yang
2018-04-02  3:46   ` [dts] [PATCH v3 01/17] framwork/packet: sniff_packet specify running target support Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 02/17] tests/checksum_offload: Replace sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 03/17] tests/etag: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 04/17] tests/ipfrag: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 05/17] tests/l2fwd_crypto: Replace sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 06/17] tests/netmap_compat: Replace sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 07/17] tests/queue_start_stop: Replace sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 08/17] tests/quota_watermark: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 09/17] tests/rxtx_callback: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 10/17] tests/scatter: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 11/17] tests/skeleton: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 12/17] tests/userspace_ethtool: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 13/17] tests/vf_daemon: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 14/17] tests/vf_vlan: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 15/17] tests/vlan_ethertype_config: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 16/17] tests/vlan: " Phil Yang
2018-04-02  3:46     ` [dts] [PATCH v3 17/17] tests/ipgre: " Phil Yang
2018-04-04  3:28     ` [dts] [PATCH v3 01/17] framwork/packet: sniff_packet specify running target support Liu, Yong
2018-04-04  7:27       ` Phil Yang
2018-04-08  6:35         ` Liu, Yong
2018-04-12  7:38           ` Phil Yang
2018-04-12  7:45             ` Liu, Yong
2018-04-12  9:52     ` [dts] [PATCH v4] " Phil Yang
2018-04-18  6:23       ` Liu, Yong
2018-09-04  8:34         ` Phil Yang (Arm Technology China)
2018-09-04  8:50           ` Liu, Yong
2018-09-04  9:14             ` Phil Yang (Arm Technology China)
2018-09-04  8:26       ` [dts] [PATCH v5 01/22] framework/packet: support packet sniffer to specify running machine Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 02/22] tests/checksum_offload: Replace sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 03/22] tests/etag: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 04/22] tests/ipfrag: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 05/22] tests/l2fwd_crypto: replaced sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 06/22] tests/netmap_compat: replaced sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 07/22] tests/queue_start_stop: replaced sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 08/22] tests/quota_watermark: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 09/22] tests/rxtx_callback: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 10/22] tests/scatter: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 11/22] tests/skeleton: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 12/22] tests/userspace_ethtool: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 13/22] tests/vf_daemon: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 14/22] tests/vf_vlan: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 15/22] tests/vlan_ethertype_config: remove unused sniff_packets Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 16/22] tests/vlan: replaced sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 17/22] tests/ipgre: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 18/22] tests/hotplug: remove unused packet sniff import Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 19/22] tests/keep_alive: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 20/22] tests/link_status_interrupt: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 21/22] tests/vhost_pmd_xstats: " Phil Yang
2018-09-04  8:26         ` [dts] [PATCH v5 22/22] tests/ddp_mpls: " Phil Yang
2018-09-17  5:12         ` [dts] [PATCH v5 01/22] framework/packet: support packet sniffer to specify running machine Phil Yang (Arm Technology China)
2018-09-21  3:09         ` Tu, Lijuan
2018-09-21  3:21           ` Phil Yang (Arm Technology China)
2018-09-21  3:41             ` Tu, Lijuan
2018-09-21  6:58               ` Phil Yang (Arm Technology China)
2018-09-21  7:19                 ` Tu, Lijuan
2018-09-21  7:32                   ` Phil Yang (Arm Technology China)
2018-09-21  8:27                     ` Tu, Lijuan
2018-09-21 12:05                       ` Phil Yang (Arm Technology China)
2018-09-26  5:15                         ` Tu, Lijuan
2018-10-16  6:19         ` [dts] [PATCH v6 " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 02/22] tests/checksum_offload: Replace sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 03/22] tests/etag: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 04/22] tests/ipfrag: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 05/22] tests/l2fwd_crypto: replaced sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 06/22] tests/netmap_compat: replaced sniff_packet to tester.tcpdump_sniff_packet Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 07/22] tests/queue_start_stop: replaced sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 08/22] tests/quota_watermark: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 09/22] tests/rxtx_callback: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 10/22] tests/scatter: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 11/22] tests/skeleton: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 12/22] tests/userspace_ethtool: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 13/22] tests/vf_daemon: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 14/22] tests/vf_vlan: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 15/22] tests/vlan_ethertype_config: remove unused sniff_packets Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 16/22] tests/vlan: replaced sniff_packets to tester.tcpdump_sniff_packets Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 17/22] tests/ipgre: " Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 18/22] tests/hotplug: remove unused packet sniff import Phil Yang
2018-10-16  6:19           ` [dts] [PATCH v6 19/22] tests/keep_alive: " Phil Yang
2018-10-16  6:20           ` [dts] [PATCH v6 20/22] tests/link_status_interrupt: " Phil Yang
2018-10-16  6:20           ` [dts] [PATCH v6 21/22] tests/vhost_pmd_xstats: " Phil Yang
2018-10-16  6:20           ` [dts] [PATCH v6 22/22] tests/ddp_mpls: " Phil Yang
2018-10-18  9:15           ` [dts] [PATCH v6 01/22] framework/packet: support packet sniffer to specify running machine Tu, Lijuan
2018-10-18 10:00             ` Phil Yang (Arm Technology China)
2018-10-19  9:29               ` Phil Yang (Arm Technology China)
2018-10-19  9:25           ` [dts] [PATCH v7] " Phil Yang
2018-10-23  9:44             ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522406469-9251-2-git-send-email-phil.yang@arm.com \
    --to=phil.yang@arm.com \
    --cc=dts@dpdk.org \
    --cc=nd@arm.com \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).