[dts] [PATCH v3 08/17] tests/quota_watermark: Replace sniff_packets to tester.tcpdump_sniff_packets

Phil Yang phil.yang at arm.com
Mon Apr 2 05:46:17 CEST 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_quota_watermark.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_quota_watermark.py b/tests/TestSuite_quota_watermark.py
index ecacf38..845b27f 100644
--- a/tests/TestSuite_quota_watermark.py
+++ b/tests/TestSuite_quota_watermark.py
@@ -39,7 +39,6 @@ import time
 import utils
 from test_case import TestCase
 from etgen import IxiaPacketGenerator
-from packet import Packet, sniff_packets, load_sniff_packets
 
 test_config = {
     'frames_to_sent': 15 * 10 ** 6,
@@ -311,9 +310,9 @@ class TestQuotaWatermark(TestCase, IxiaPacketGenerator):
         rx_intf = self.tester.get_interface(rev_port)
         tx_intf = self.tester.get_interface(send_port)
         # send and sniff packet
-        rx_inst = sniff_packets(rx_intf, timeout=5)
+        rx_inst = self.tester.tcpdump_sniff_packets(rx_intf, timeout=5)
         self.send_pcap_pkt_by_scapy(self.tester, tgen_input[0][2], tx_intf)
-        pkts = load_sniff_packets(rx_inst)
+        pkts = self.tester.load_tcpdump_sniff_packets(rx_inst)
         self.verify(len(pkts) == pkt_cnt, "Packet not forwarded as expected")
 
         return
-- 
2.7.4



More information about the dts mailing list