From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Branch: master
scripts: fix trace.py
Newer versions of tcpdump uses by trace.py emit slightly
longer text "reading from file -, link-type EN10MB (Ethernet)"
and make the tst-tracing fail. This patch make trace.py only
check that the line begins with that expected text.
Signed-off-by: Waldemar Kozaczuk <
jwkoz...@gmail.com>
---
diff --git a/scripts/trace.py b/scripts/trace.py
--- a/scripts/trace.py
+++ b/scripts/trace.py
@@ -346,7 +346,7 @@ def format_packet_sample(sample):
pcap = dpkt.pcap.Writer(proc.stdin)
write_sample_to_pcap(sample, pcap)
pcap.close()
- assert(proc.stdout.readline().decode() == "reading from file -, link-type EN10MB (Ethernet)\n")
+ assert(proc.stdout.readline().decode().startswith("reading from file -, link-type EN10MB (Ethernet)"))
packet_line = proc.stdout.readline().rstrip()
proc.wait()
return packet_line