Fixing btests.

- When Bro is given a PRNG seed, it now uses its own internal random
  number generator that produces consistent results across sytems.
  Note that this internal generator isn't very good, so it should only
  be used for testing purposes.

- The BTest configuration now sets the environemnt variables TZ=UTC
  and LANG=C to ensure consistent results.

- Fixing doc markup in logging.bro.

- Updating baselines.
This commit is contained in:
Robin Sommer 2011-04-21 19:31:44 -07:00
parent 5fba6d144e
commit da0ea67453
13 changed files with 163 additions and 124 deletions

View file

@ -140,7 +140,7 @@ extern void hmac_md5(size_t size, const unsigned char* bytes,
extern const char* md5_digest_print(const unsigned char digest[16]);
// Initializes RNGs for random() and MD5 usage. If seed is given, then
// Initializes RNGs for bro_random() and MD5 usage. If seed is given, then
// it is used (to provide determinism). If load_file is given, the seeds
// (both random & MD5) are loaded from that file. This takes precedence
// over the "seed" argument. If write_file is given, the seeds are written
@ -149,6 +149,11 @@ extern const char* md5_digest_print(const unsigned char digest[16]);
extern void init_random_seed(uint32 seed, const char* load_file,
const char* write_file);
// Replacement for the system random(), to which is normally falls back
// except when a seed has been given. In that case, we use our own
// predictable PRNG.
long int bro_random();
extern uint64 rand64bit();
#define UHASH_KEY_SIZE 32