[dts] [PATCH 02/17] tests/checksum_offload: Replaced sniff_packet to tester.tcpdump_sniff_packet
Phil Yang
phil.yang at arm.com
Fri Mar 23 09:03:51 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_checksum_offload.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 2ff5c2f..6541ba5 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -43,7 +43,6 @@ import utils
from test_case import TestCase
from pmd_output import PmdOutput
-from packet import Packet, sniff_packets, load_sniff_packets, strip_pktload
from test_capabilities import DRIVER_TEST_LACK_CAPA
class TestChecksumOffload(TestCase):
@@ -175,13 +174,14 @@ class TestChecksumOffload(TestCase):
self.tester.send_expect("exit()", "#")
- inst = sniff_packets(intf=rx_interface, count=len(packets_sent), filters=[{'layer':'ether', 'config':{'src': sniff_src}}])
+ inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent),
+ filters=[{'layer':'ether', 'config':{'src': sniff_src}}])
for packet_type in packets_sent.keys():
self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface))
self.tester.scapy_execute()
- p = load_sniff_packets(inst)
+ p = self.tester.load_tcpdump_sniff_packets(inst)
nr_packets=len(p)
reslist = [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]
out = string.join(reslist, ",")
--
2.7.4
More information about the dts
mailing list