[dts] [PATCH 09/17] tests/rxtx_callback: Replaced sniff_packets to tester.tcpdump_sniff_packets

Phil Yang phil.yang at arm.com
Fri Mar 23 09:03:58 CET 2018


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

Signed-off-by: Phil Yang <phil.yang at arm.com>
---
 tests/TestSuite_rxtx_callbacks.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_rxtx_callbacks.py b/tests/TestSuite_rxtx_callbacks.py
index dd968a4..a654480 100644
--- a/tests/TestSuite_rxtx_callbacks.py
+++ b/tests/TestSuite_rxtx_callbacks.py
@@ -41,7 +41,6 @@ from test_case import TestCase
 from plotting import Plotting
 from settings import HEADER_SIZE
 from etgen import IxiaPacketGenerator
-from packet import Packet, sniff_packets, load_sniff_packets
 
 
 class TestRxtxCallbacks(TestCase):
@@ -77,7 +76,7 @@ class TestRxtxCallbacks(TestCase):
         self.iface_port0 = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0]))
         self.iface_port1 = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[1]))
 
-        self.inst_port1 = sniff_packets(self.iface_port1)
+        self.inst_port1 = self.tester.tcpdump_sniff_packets(self.iface_port1)
         self.scapy_send_packet(self.iface_port0)
 
         out_port1 = self.get_tcpdump_package(self.inst_port1)
@@ -92,7 +91,7 @@ class TestRxtxCallbacks(TestCase):
         self.tester.scapy_execute()
 
     def get_tcpdump_package(self,inst):
-        pkts = load_sniff_packets(inst)
+        pkts = self.tester.load_tcpdump_sniff_packets(inst)
         dsts = []
         for packet in pkts:
             dst = packet.strip_element_layer2("dst")
-- 
2.7.4



More information about the dts mailing list