test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1]tests/TestSuite_multicast: update to new packet api
@ 2019-10-17  7:30 Xiao Qimai
  2019-10-22  9:52 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Qimai @ 2019-10-17  7:30 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

update case to invoke new api

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_multicast.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_multicast.py b/tests/TestSuite_multicast.py
index bcdb0bc..b9dc4e8 100644
--- a/tests/TestSuite_multicast.py
+++ b/tests/TestSuite_multicast.py
@@ -108,7 +108,7 @@ class TestMulticast(TestCase):
                 for rx_port in trafficFlow[flow][1].split(","):
                     sniff_src = "not 00:00:00:00:00:00"
 
-                    inst = self.tester.tcpdump_sniff_packets(intf=self.tester.get_interface(eval(rx_port)), timeout=5,
+                    inst = self.tester.tcpdump_sniff_packets(intf=self.tester.get_interface(eval(rx_port)),
                         count=1, filters=[{"layer": "ether", "config": {"src": sniff_src}}] )
                     dmac = self.dut.get_mac_address(TGs[int(trafficFlow[flow][0][2])])
 
@@ -119,8 +119,8 @@ class TestMulticast(TestCase):
                     time.sleep(5)  # Wait for the sniffer to finish.
 
                     pkts = self.tester.load_tcpdump_sniff_packets(inst)
-                    for packet in pkts:
-                        result = str(packet.pktgen.pkt.show)
+                    for i in range(len(pkts)):
+                        result = str(pkts[i].show)
 
                         print result
                         self.verify("Ether" in result, "No packet received")
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1]tests/TestSuite_multicast: update to new packet api
  2019-10-17  7:30 [dts] [PATCH V1]tests/TestSuite_multicast: update to new packet api Xiao Qimai
@ 2019-10-22  9:52 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-10-22  9:52 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Thursday, October 17, 2019 3:30 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]tests/TestSuite_multicast: update to new packet api
> 
> update case to invoke new api
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_multicast.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_multicast.py b/tests/TestSuite_multicast.py index
> bcdb0bc..b9dc4e8 100644
> --- a/tests/TestSuite_multicast.py
> +++ b/tests/TestSuite_multicast.py
> @@ -108,7 +108,7 @@ class TestMulticast(TestCase):
>                  for rx_port in trafficFlow[flow][1].split(","):
>                      sniff_src = "not 00:00:00:00:00:00"
> 
> -                    inst =
> self.tester.tcpdump_sniff_packets(intf=self.tester.get_interface(eval(rx_port)
> ), timeout=5,
> +                    inst =
> + self.tester.tcpdump_sniff_packets(intf=self.tester.get_interface(eval(
> + rx_port)),
>                          count=1, filters=[{"layer": "ether", "config": {"src": sniff_src}}] )
>                      dmac = self.dut.get_mac_address(TGs[int(trafficFlow[flow][0][2])])
> 
> @@ -119,8 +119,8 @@ class TestMulticast(TestCase):
>                      time.sleep(5)  # Wait for the sniffer to finish.
> 
>                      pkts = self.tester.load_tcpdump_sniff_packets(inst)
> -                    for packet in pkts:
> -                        result = str(packet.pktgen.pkt.show)
> +                    for i in range(len(pkts)):
> +                        result = str(pkts[i].show)
> 
>                          print result
>                          self.verify("Ether" in result, "No packet received")
> --
> 1.8.3.1


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17  7:30 [dts] [PATCH V1]tests/TestSuite_multicast: update to new packet api Xiao Qimai
2019-10-22  9:52 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox