[dts] [PATCH v2 17/17] tests/ipgre: Replace sniff_packets to tester.tcpdump_sniff_packets
Phil Yang
phil.yang at arm.com
Fri Mar 30 12:41:09 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_ipgre.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_ipgre.py b/tests/TestSuite_ipgre.py
index 2dccb9c..24afce0 100644
--- a/tests/TestSuite_ipgre.py
+++ b/tests/TestSuite_ipgre.py
@@ -44,7 +44,7 @@ import re
import time
import os
-from packet import Packet, sniff_packets, load_sniff_packets, NVGRE, IPPROTO_NVGRE
+from packet import Packet, NVGRE, IPPROTO_NVGRE
from scapy.utils import wrpcap, rdpcap
from scapy.packet import split_layers,bind_layers
@@ -98,11 +98,12 @@ class TestIpgre(TestCase):
if layer_configs:
for layer in layer_configs.keys():
pkt.config_layer(layer, layer_configs[layer])
- inst = sniff_packets(self.tester_iface, count=1, timeout=8)
+ inst = self.tester.tcpdump_sniff_packets(self.tester_iface, count=1, timeout=8)
pkt.send_pkt(tx_port=self.tester_iface)
out = self.dut.get_session_output(timeout=2)
time.sleep(1)
- load_sniff_packets(inst)
+ self.tester.session.copy_file_from("/tmp/sniff_%s.pcap" % self.tester_iface, "/tmp/")
+ self.tester.load_tcpdump_sniff_packets(inst)
if self.printFlag: # debug output
print out
for pkt_layer_name in pkt_names:
--
2.7.4
More information about the dts
mailing list