zeek/testing
Jon Siwek fcd735cecd Fix core.truncation unit test on macOS.
The pcap file format has a global header and a header per packet.  The
global header of the pcap in question had a snaplen of 1, but with
packet headers indicating the full number of bytes saved within the
file.  It seems like the pcap file must of been artifically edited in
order for it to be this way.

When reporting the captured length of a packet, Apple's version of
libpcap now seems to report the full number of bytes saved within the
pcap's per-packet headers, but other versions seem to report the snaplen
from the global pcap header.  This caused the core.truncation test to
behave differently on macOS from other platforms.

I've manually hexedit'd the pcap so that the snaplen is still 1, but
contains just a single packet with a pcap header indicating a length of
8, which is less than the size of the link layer header and so should
still test the original code path that the unit test intended to
exercise.
2017-08-11 14:03:06 -05:00
..
btest Fix core.truncation unit test on macOS. 2017-08-11 14:03:06 -05:00
external Merge remote-tracking branch 'origin/topic/johanna/bit-1612' 2016-07-14 16:26:17 -07:00
scripts Merge remote-tracking branch 'origin/master' into fastpath 2016-10-21 09:35:04 -05:00
.gitignore
Makefile Fix portability issue with use of mktemp 2016-01-28 14:32:22 -06:00
README

This directory contains suites for testing for Bro's correct
operation:

    btest/
        An ever-growing set of small unit tests testing Bro's
        functionality.

    external/
        A framework for downloading additional test sets that run more
        complex Bro configuration on larger traces files. Due to their
        size, these are not included directly. See the README for more
        information. 

    scripts/
        Helpers scripts used by some tests.