[dts] [PATCH V1]tests/TestSuite_multicast: update to new packet api

Tu, Lijuan lijuan.tu at intel.com
Tue Oct 22 11:52:33 CEST 2019


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Xiao Qimai
> Sent: Thursday, October 17, 2019 3:30 PM
> To: dts at dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao at 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 at 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



More information about the dts mailing list