make test: work around scapy truncated packets 84/5084/1
authorKlement Sekera <ksekera@cisco.com>
Thu, 9 Feb 2017 05:04:36 +0000 (06:04 +0100)
committerKlement Sekera <ksekera@cisco.com>
Thu, 9 Feb 2017 05:10:47 +0000 (06:10 +0100)
Under stress, it's possible to hit a race condition, when the packet
header is fully written to pcap, but not all packet data - yet.
Scapy is stupid enough to:
1. not detect and report this error, truncating the packet instead
2. continue munching more data from wrong offset
The work around is to scan the file ahead, parse the packet header,
figure out how much data we need, wait for the file to be big
enough, then restore the file position back to where it was
and finally let scapy parse the packet.

Change-Id: I9fc71d3ebdc62ecab6c90b90f177d0eaeb09b8bb
Signed-off-by: Klement Sekera <ksekera@cisco.com>

No differences found