[dts] [PATCH 04/17] tests/ipfrag: Replaced sniff_packet to tester.tcpdump_sniff_packet
Phil Yang
phil.yang at arm.com
Fri Mar 23 09:03:53 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_ipfrag.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py
index f23dbe1..9ebda1f 100644
--- a/tests/TestSuite_ipfrag.py
+++ b/tests/TestSuite_ipfrag.py
@@ -39,7 +39,6 @@ import string
import re
import time
from settings import HEADER_SIZE
-from packet import Packet, sniff_packets, load_sniff_packets
lpm_table_ipv4 = [
"{IPv4(100,10,0,0), 16, P1}",
@@ -159,7 +158,7 @@ l3fwd_ipv4_route_array[] = {\\\n"
expPkts = 1
val = 2
- inst = sniff_packets(intf=self.rxItf, timeout=5)
+ inst = self.tester.tcpdump_sniff_packets(intf=self.rxItf, timeout=5)
# send packet
for times in range(burst):
pkt_size = pkt_sizes[pkt_sizes.index(size) + times]
@@ -169,7 +168,7 @@ l3fwd_ipv4_route_array[] = {\\\n"
pkt.send_pkt(tx_port=self.txItf)
# verify normal packet just by number, verify fragment packet by all elements
- pkts = load_sniff_packets(inst)
+ pkts = self.tester.load_tcpdump_sniff_packets(inst)
self.verify(len(pkts) == expPkts, "Failed on forward packet size " + str(size))
if flag == 'frag':
idx = 1
@@ -209,7 +208,7 @@ l3fwd_ipv4_route_array[] = {\\\n"
expPkts = 1
val = 2
- inst = sniff_packets(intf=self.rxItf, timeout=5)
+ inst = self.tester.tcpdump_sniff_packets(intf=self.rxItf, timeout=5)
# send packet
for times in range(burst):
pkt_size = pkt_sizes[pkt_sizes.index(size) + times]
@@ -219,7 +218,7 @@ l3fwd_ipv4_route_array[] = {\\\n"
pkt.send_pkt(tx_port=self.txItf)
# verify normal packet just by number, verify fragment packet by all elements
- pkts = load_sniff_packets(inst)
+ pkts = self.tester.load_tcpdump_sniff_packets(inst)
self.verify(len(pkts) == expPkts, "Failed on forward packet size " + str(size))
if flag == 'frag':
idx = 1
--
2.7.4
More information about the dts
mailing list