[dts] [PATCH v5 12/22] tests/userspace_ethtool: replaced sniff_packets to tester.tcpdump_sniff_packets

Phil Yang phil.yang at arm.com
Tue Sep 4 10:26:25 CEST 2018


From: Phil Yang <phil.yang at arm.com>

Make packet sniff run on the Tester.

Signed-off-by: Phil Yang <phil.yang at arm.com>
Suggested-by: Marvin Liu <yong.liu at intel.com>
---
 tests/TestSuite_userspace_ethtool.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index eccc77b..8ade421 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -39,7 +39,7 @@ import utils
 import time
 import re
 from test_case import TestCase
-from packet import Packet, sniff_packets, load_sniff_packets
+from packet import Packet
 import random
 from etgen import IxiaPacketGenerator
 from settings import HEADER_SIZE
@@ -490,9 +490,9 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
             tester_port = self.tester.get_local_port(port)
             intf = self.tester.get_interface(tester_port)
             # send and sniff packet
-            inst = sniff_packets(intf, timeout=5)
+            inst = self.tester.tcpdump_sniff_packets(intf, timeout=5)
             pkt.send_pkt(tx_port=intf)
-            pkts = load_sniff_packets(inst)
+            pkts = self.tester.load_tcpdump_sniff_packets(inst)
             self.verify(len(pkts) == 1, "Packet not forwarded as expected")
             src_mac = pkts[0].strip_layer_element("layer2", "src")
             self.verify(src_mac == valid_mac, "Forwarded packet not match default mac")
-- 
2.7.4



More information about the dts mailing list