test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff method
@ 2018-12-05  1:36 lihong
  2018-12-06  5:46 ` Zhu, WenhuiX
  2018-12-11 18:59 ` Lijuan Tu
  0 siblings, 2 replies; 4+ messages in thread
From: lihong @ 2018-12-05  1:36 UTC (permalink / raw)
  To: dts; +Cc: lihong

About the test case test_vxlan_ipv6_checksum_offload,the sniff
method may not work well when add filter arguments, so use
tcpdump_sniff_packets instead of it.

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 tests/TestSuite_vxlan.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
index d5a9d77..8de8384 100644
--- a/tests/TestSuite_vxlan.py
+++ b/tests/TestSuite_vxlan.py
@@ -447,16 +447,14 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
         config.create_pcap()
 
         # remove tempory files
+        config.capture_file = "/tmp/sniff_%s.pcap" % self.recv_iface
         self.tester.send_expect("rm -rf %s" % config.capture_file, "# ")
         # save the capture packet into pcap format
         self.tester.scapy_background()
-        self.tester.scapy_append(
-            'p=sniff(iface="%s",filter="ether[12:2]!=0x88cc",count=1,timeout=5)' % self.recv_iface)
-        self.tester.scapy_append(
-            'wrpcap(\"%s\", p)' % config.capture_file)
-        self.tester.scapy_foreground()
 
+        inst = self.tester.tcpdump_sniff_packets(self.recv_iface, timeout=5)
         config.send_pcap(self.tester_iface)
+        self.tester.load_tcpdump_sniff_packets(inst)
         time.sleep(5)
 
         # extract the checksum offload from saved pcap file
-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff method
  2018-12-05  1:36 [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff method lihong
@ 2018-12-06  5:46 ` Zhu, WenhuiX
  2018-12-11 18:59 ` Lijuan Tu
  1 sibling, 0 replies; 4+ messages in thread
From: Zhu, WenhuiX @ 2018-12-06  5:46 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ma, LihongX, Wang, FengqinX



-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
Sent: Wednesday, December 5, 2018 9:37 AM
To: dts@dpdk.org
Cc: Ma, LihongX <lihongx.ma@intel.com>
Subject: [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff method

About the test case test_vxlan_ipv6_checksum_offload,the sniff method may not work well when add filter arguments, so use tcpdump_sniff_packets instead of it.

Signed-off-by: lihong <lihongx.ma@intel.com>
Tested-by: wenhui<wenhuix.zhu@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff method
  2018-12-11 18:59 ` Lijuan Tu
@ 2018-12-11 10:51   ` Tu, Lijuan
  0 siblings, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2018-12-11 10:51 UTC (permalink / raw)
  To: Tu, Lijuan, Ma, LihongX, dts

Sorry, applied V2 instead of V1

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Lijuan Tu
> Sent: Wednesday, December 12, 2018 3:00 AM
> To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff
> method
> 
> Applied, thanks
> 
> 
> On 2018年12月05日 09:36, lihong wrote:
> > About the test case test_vxlan_ipv6_checksum_offload,the sniff method
> > may not work well when add filter arguments, so use
> > tcpdump_sniff_packets instead of it.
> >
> > Signed-off-by: lihong <lihongx.ma@intel.com>
> > ---
> >   tests/TestSuite_vxlan.py | 8 +++-----
> >   1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py index
> > d5a9d77..8de8384 100644
> > --- a/tests/TestSuite_vxlan.py
> > +++ b/tests/TestSuite_vxlan.py
> > @@ -447,16 +447,14 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
> >           config.create_pcap()
> >
> >           # remove tempory files
> > +        config.capture_file = "/tmp/sniff_%s.pcap" % self.recv_iface
> >           self.tester.send_expect("rm -rf %s" % config.capture_file, "#
> ")
> >           # save the capture packet into pcap format
> >           self.tester.scapy_background()
> > -        self.tester.scapy_append(
> > -
> 'p=sniff(iface="%s",filter="ether[12:2]!=0x88cc",count=1,timeout=5)' %
> self.recv_iface)
> > -        self.tester.scapy_append(
> > -            'wrpcap(\"%s\", p)' % config.capture_file)
> > -        self.tester.scapy_foreground()
> >
> > +        inst = self.tester.tcpdump_sniff_packets(self.recv_iface,
> > + timeout=5)
> >           config.send_pcap(self.tester_iface)
> > +        self.tester.load_tcpdump_sniff_packets(inst)
> >           time.sleep(5)
> >
> >           # extract the checksum offload from saved pcap file


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff method
  2018-12-05  1:36 [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff method lihong
  2018-12-06  5:46 ` Zhu, WenhuiX
@ 2018-12-11 18:59 ` Lijuan Tu
  2018-12-11 10:51   ` Tu, Lijuan
  1 sibling, 1 reply; 4+ messages in thread
From: Lijuan Tu @ 2018-12-11 18:59 UTC (permalink / raw)
  To: lihong, dts

Applied, thanks


On 2018年12月05日 09:36, lihong wrote:
> About the test case test_vxlan_ipv6_checksum_offload,the sniff
> method may not work well when add filter arguments, so use
> tcpdump_sniff_packets instead of it.
>
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>   tests/TestSuite_vxlan.py | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
> index d5a9d77..8de8384 100644
> --- a/tests/TestSuite_vxlan.py
> +++ b/tests/TestSuite_vxlan.py
> @@ -447,16 +447,14 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
>           config.create_pcap()
>   
>           # remove tempory files
> +        config.capture_file = "/tmp/sniff_%s.pcap" % self.recv_iface
>           self.tester.send_expect("rm -rf %s" % config.capture_file, "# ")
>           # save the capture packet into pcap format
>           self.tester.scapy_background()
> -        self.tester.scapy_append(
> -            'p=sniff(iface="%s",filter="ether[12:2]!=0x88cc",count=1,timeout=5)' % self.recv_iface)
> -        self.tester.scapy_append(
> -            'wrpcap(\"%s\", p)' % config.capture_file)
> -        self.tester.scapy_foreground()
>   
> +        inst = self.tester.tcpdump_sniff_packets(self.recv_iface, timeout=5)
>           config.send_pcap(self.tester_iface)
> +        self.tester.load_tcpdump_sniff_packets(inst)
>           time.sleep(5)
>   
>           # extract the checksum offload from saved pcap file

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-11 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05  1:36 [dts] [PATCH V1] Use tcpdump_sniff_packets instead of sniff method lihong
2018-12-06  5:46 ` Zhu, WenhuiX
2018-12-11 18:59 ` Lijuan Tu
2018-12-11 10:51   ` Tu, Lijuan

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).