Commit graph

243 commits

Author SHA1 Message Date
Jon Siwek
771728720d Normalize Notice::Type identifiers per convention. (closes #484) 2011-07-28 14:54:18 -05:00
Jon Siwek
451b43498f Another fix to the default-loaded-scripts test.
sed on some platforms like OS X (maybe FreeBSD in general) won't recognize
semi-colon delimited commands as multiple commands, instead use the -e
option multiple times to build the command list.
2011-07-27 15:11:05 -05:00
Jon Siwek
19dab4fdda Add new piped_exec BiF.
And changing email_notice_to() function in notice framework to
interface with sendmail through it.
2011-07-27 13:52:24 -05:00
Robin Sommer
58ceceac31 Fixing a couple tests. 2011-07-25 21:44:51 -07:00
Robin Sommer
28513b8325 Merge remote-tracking branch 'origin/topic/jsiwek/update-restdoc-target'
* origin/topic/jsiwek/update-restdoc-target:
  Adding a documentation coverage test.
  Fixes to relative @load'ing.

Closes #513.
2011-07-25 17:50:57 -07:00
Jon Siwek
78e2d768c7 Adding a documentation coverage test.
- The CMake targets for generating reST docs from policy scripts are now
  automatically generated via the genDocSourcesList.sh script

- Fixed a lot of parsing errors in policy scripts that I saw along the way
2011-07-23 20:55:06 -05:00
Jon Siwek
b6f030dd1a Updating baseline for default loaded scripts... again. 2011-07-23 18:53:23 -05:00
Jon Siwek
6dd202a061 Update core.conn-uid test baseline.
The UIDs changed because notice policy isn't generating unique_ids anymore.
2011-07-23 13:24:05 -05:00
Jon Siwek
e59c4b8c3c Rename/change policy.misc.loaded-scripts, again baselines default loaded scripts 2011-07-22 20:27:39 -05:00
Jon Siwek
dc839ff3f7 Merge branch 'master' into fastpath 2011-07-22 20:18:40 -05:00
Robin Sommer
4a15b8668f Merge remote-tracking branch 'origin/topic/jsiwek/pybroccoli-float-repr'
* origin/topic/jsiwek/pybroccoli-float-repr:
  Update pybroccoli unit test baseline.

Closes #507.
2011-07-22 17:15:50 -07:00
Jon Siwek
a4029006ed Changes to unit tests that rely on libmagic.
If a test doesn't rely on libmagic, mime type related columns of baselined
logs are filtered out.

If a test does rely on libmagic, it needs to use the TEST-REQUIRES btest
macro to check that the bro build supports it, and then mime type related
columns of logs can be normalized via a logging filter to reduce sensitivity
to varying version of libmagic.
2011-07-22 16:33:51 -07:00
Jon Siwek
b340604346 core.load-pkg test now insensitive to default-loaded scripts. 2011-07-22 16:33:50 -07:00
Jon Siwek
b05c34ed29 LogWriterAscii now prints time values w/ constant 6 digit precision.
closes #508
2011-07-22 16:33:50 -07:00
Jon Siwek
624abd642f Changes to unit tests that rely on libmagic.
If a test doesn't rely on libmagic, mime type related columns of baselined
logs are filtered out.

If a test does rely on libmagic, it needs to use the TEST-REQUIRES btest
macro to check that the bro build supports it, and then mime type related
columns of logs can be normalized via a logging filter to reduce sensitivity
to varying version of libmagic.
2011-07-22 13:32:02 -05:00
Jon Siwek
cd5c564eb4 Change policy.misc.loaded-scripts tests.
To make it insensitive to scripts loaded by default, now it just
checks that the loaded_scripts log is created and has contents.
2011-07-22 11:59:17 -05:00
Jon Siwek
6fb488c587 core.load-pkg test now insensitive to default-loaded scripts. 2011-07-22 11:14:53 -05:00
Jon Siwek
d30a335dba LogWriterAscii now prints time values w/ constant 6 digit precision.
closes #508
2011-07-22 10:49:43 -05:00
Robin Sommer
eb1e76600c Merge remote-tracking branch 'origin/topic/script-load-changes'
* origin/topic/script-load-changes:
  Fix reST file name associated w/ stdin when in doc mode (closes #497)
  Update @prefixes test.
  Rewrite a test using btest's TEST-START-FILE directive
  Fix @unload'd files from generating bro_script_loaded event.
  Renaming a test better.
  Reimplementation of the @prefixes statement.
  Fix accidental overwrite of BROPATH copy.
  Make @load statements recognize relative paths.
2011-07-21 15:29:15 -07:00
Jon Siwek
8a24d8d410 Update pybroccoli unit test baseline.
Corresponds to commit 46e1b99c1d90900689fb47cf12ac9c5e2340a023
in broccoli-python repo.
2011-07-21 15:26:44 -05:00
Robin Sommer
2892026201 Merge remote-tracking branch 'origin/topic/jsiwek/irc-orig'
* origin/topic/jsiwek/irc-orig:
  Shorten what's displayed in the IRC's log mime_type column for DCC transfers
  Add IRC unit tests.
  Small tweak to IRC event handlder priorities
  Fix IRC analyzer supplying wrong type to irc_dcc_message event.
  Changes to IRC analyzer and events (addresses #469).
2011-07-20 17:13:06 -07:00
Jon Siwek
2a997f5ef3 Update @prefixes test. 2011-07-20 16:02:38 -05:00
Jon Siwek
f6dfbef952 Rewrite a test using btest's TEST-START-FILE directive 2011-07-20 15:59:07 -05:00
Jon Siwek
0dd1a1e21e Fix @unload'd files from generating bro_script_loaded event. 2011-07-20 15:56:25 -05:00
Jon Siwek
089b822302 Merge branch 'master' into topic/script-load-changes 2011-07-20 15:38:22 -05:00
Jon Siwek
717a2a54f6 Merge branch 'master' into topic/jsiwek/irc-orig 2011-07-20 15:11:43 -05:00
Jon Siwek
beb44aee62 Shorten what's displayed in the IRC's log mime_type column for DCC transfers 2011-07-20 15:08:19 -05:00
Jon Siwek
73c138152c Add IRC unit tests. 2011-07-20 14:49:20 -05:00
Jon Siwek
ad7654745f Fix istate.events tests.
The receiver now registers for signature_match event so that
the http.log comes out the same as the sender's side.
2011-07-19 17:40:12 -07:00
Robin Sommer
b2a3723a1d Fixing tests that need a diff canonifier. 2011-07-19 17:39:46 -07:00
Seth Hall
2eb12fef61 More conn-id file renaming fixes. 2011-07-19 12:12:16 -04:00
Seth Hall
7ad0af666d Renamed utils/conn_ids.bro to utils/conn-ids.bro for consistency. 2011-07-19 12:00:27 -04:00
Seth Hall
cee3991822 Script updates.
- Fixing more vestiges from moving site.bro and removing functions.bro

- Updates comments on analysis-groups.bro

- Added the trim-trace-file script from broctl.
2011-07-19 10:41:54 -04:00
Jon Siwek
9d468493f2 Renaming a test better. 2011-07-14 22:06:16 -05:00
Jon Siwek
d97003892b Reimplementation of the @prefixes statement.
Any added prefixes are now used *after* all input files have been
parsed to look for a prefixed, flattened version of the input file
somewhere in BROPATH and, if found, load it.

For example, if "lcl" is in @prefixes, and site.bro is loaded, then
a file named "lcl.site.bro" that's in BROPATH would end up being
automatically loaded as well.  Packages work similarly, e.g. loading
"protocols/http" means a file named "lcl.protocols.http.bro" in BROPATH
gets loaded automatically.
2011-07-14 21:32:02 -05:00
Robin Sommer
5c2ffab892 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-14 11:08:38 -07:00
Jon Siwek
e5e3bf28ec Make @load statements recognize relative paths.
For example a script can do "@load ./foo" to load a script named
foo.bro that lives in the same directory or "@load ../bar" to load
a script named bar.bro in the parent directory, even if those
directories are not contained in BROPATH.
2011-07-14 11:35:23 -05:00
Seth Hall
2045f1e366 Updating a baseline to make a test succeed. 2011-07-14 08:49:33 -04:00
Seth Hall
d9f0612546 Lots of cleanup, tests, and the new Control framework.
- Control framework is for runtime control of Bro instances.
  It was extracted from BroControl and made more generic.

- Tests for cluster frameworks and control framework.

- Small fix for btest.cfg

- Fixed a bug in the cluster framework that was causing things to break.
2011-07-13 17:09:20 -04:00
Robin Sommer
250db65043 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-12 18:21:08 -07:00
Seth Hall
427855a40d Fixing the name of a test so that it actually runs. 2011-07-12 16:19:47 -04:00
Seth Hall
b5ca7ceb59 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-12 14:12:44 -04:00
Seth Hall
0332a06012 Fixed most of the tests after the script reorganization. 2011-07-12 14:12:25 -04:00
Robin Sommer
0034eeb99a Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add git ignore for public trace testing repo path.

(Moved the gitignore entry into the testing/external directory.)
2011-07-12 09:21:33 -07:00
Robin Sommer
1d20d2a985 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-09 08:46:28 -07:00
Robin Sommer
42f214b8d0 Test repository directory names no longer need to end in *.git. 2011-07-09 08:44:29 -07:00
Robin Sommer
8bacb6eb3d New BiF record_field_vals() that returns the fields of a record in a
table with meta-information.

Example:

type r: record {
	a: count;
	b: string &default="Foo";
	c: double &optional;
	d: string &log;
};

event bro_init()
{
    local x: r = [$a=42, $d="Bar"];
    print record_fields(x);
}

This prints:

  {
  [a] = [type_name=record, log=F, value=42, default_val=<uninitialized>]
  [b] = [type_name=record, log=F, value=<uninitialized>, default_val=Foo],
  [c] = [type_name=record, log=F, value=<uninitialized>, default_val=<uninitialized>],
  [d] = [type_name=record, log=T, value=Bar, default_val=<uninitialized>],
  }

This is one more step in Seth's quest for full inspection support. :-)
2011-07-07 19:56:48 -07:00
Robin Sommer
084c2086a4 Fixing bug causing crash when running without arguments. 2011-07-07 19:56:48 -07:00
Robin Sommer
97b5f812c7 A new event bro_script_loaded() raised for each policy script loaded.
Also removing the -l command-line option as that can now be done at
the script-level.

A couple tests fail now that use -l. Leaving that until we have
script-level replacement.
2011-07-07 19:56:26 -07:00
Robin Sommer
df1b2f922b Renaming reporter_message to report_info.
Same change internally.
2011-07-07 19:56:25 -07:00