zeek/testing
Matthias Vallentin 532fbfb4d2 Factor implementation and change interface.
When constructing a Bloom filter, one now has to pass a HashPolicy instance to
it. This separates more clearly the concerns of hashing and Bloom filter
management.

This commit also changes the interface to initialize Bloom filters: there exist
now two initialization functions, one for each type:

  (1) bloomfilter_basic_init(fp: double,
                             capacity: count,
                             name: string &default=""): opaque of bloomfilter

  (2) bloomfilter_counting_init(k: count,
                                cells: count,
                                max: count,
                                name: string &default=""): opaque of bloomfilter

The BiFs for adding elements and performing lookups remain the same. This
essentially gives us "BiF polymorphism" at script land, where the
initialization BiF constructs the most derived type while subsequent BiFs
adhere to the same interface.

The reason why we split up the constructor in this case is that we have not yet
derived the math that computes the optimal number of hash functions for
counting Bloom filters---users have to explicitly parameterize them for now.
2013-06-17 16:14:11 -07:00
..
btest Factor implementation and change interface. 2013-06-17 16:14:11 -07:00
external FileAnalysis: add custom libmagic database. 2013-04-12 11:58:19 -05:00
scripts Ignoring file ids in external tests. 2013-06-04 21:23:50 -07:00
.gitignore Test coverage integration for external tests and complete suite. 2012-01-12 11:58:13 -06:00
Makefile Make tests even quieter. 2012-05-24 17:33:02 -07:00
README Cleaning up some testing stuff. 2011-07-05 18:47:08 -07:00

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.