[dts] [PATCH v2 10/17] tests/scatter: Replace sniff_packets to tester.tcpdump_sniff_packets
Phil Yang
phil.yang at arm.com
Fri Mar 30 12:41:02 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_scatter.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
index 74fc08f..4169774 100644
--- a/tests/TestSuite_scatter.py
+++ b/tests/TestSuite_scatter.py
@@ -35,7 +35,7 @@ Test Scattered Packets.
"""
from test_case import TestCase
from pmd_output import PmdOutput
-from packet import Packet, sniff_packets, load_sniff_packets, strip_pktload
+from packet import Packet, strip_pktload
import time
#
#
@@ -82,11 +82,12 @@ class TestScatter(TestCase):
"""
dmac = self.dut.get_mac_address(self.port)
- inst = sniff_packets(self.intf)
+ inst = self.tester.tcpdump_sniff_packets(self.intf)
pkt = Packet(pkt_type="IP_RAW", pkt_len=pktsize)
pkt.config_layer('ether', {'dst': dmac})
pkt.send_pkt(tx_port=self.intf)
- sniff_pkts = load_sniff_packets(inst)
+ self.tester.session.copy_file_from("/tmp/sniff_%s.pcap" % self.intf, "/tmp/")
+ sniff_pkts = self.tester.load_tcpdump_sniff_packets(inst)
res = ""
if len(sniff_pkts):
--
2.7.4
More information about the dts
mailing list