[dts] [PATCH v6 04/22] tests/ipfrag: Replace sniff_packet to tester.tcpdump_sniff_packet
Phil Yang
phil.yang at arm.com
Tue Oct 16 08:19:44 CEST 2018
Make packet sniff run on the Tester.
Signed-off-by: Phil Yang <phil.yang at arm.com>
Suggested-by: Marvin Liu <yong.liu at intel.com>
Suggested-by: Tu Lijuan <lijuan.tu at intel.com>
---
tests/TestSuite_ipfrag.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py
index f23dbe1..38e00d7 100644
--- a/tests/TestSuite_ipfrag.py
+++ b/tests/TestSuite_ipfrag.py
@@ -39,7 +39,7 @@ import string
import re
import time
from settings import HEADER_SIZE
-from packet import Packet, sniff_packets, load_sniff_packets
+from packet import Packet
lpm_table_ipv4 = [
"{IPv4(100,10,0,0), 16, P1}",
@@ -159,7 +159,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 +169,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 +209,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 +219,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