Commit graph

393 commits

Author SHA1 Message Date
Robin Sommer
9aef0c0f5a Fixing packet filter test.
Adapting the IPv6 one as well, though I believe that's already
broken anyway ...
2011-11-03 17:42:06 -07:00
Robin Sommer
5b79d2b15f Baseline updates.
Also a small tweak to the genDocSourcesList.sh as I was seein
non-consistent output order.
2011-10-26 15:27:03 -07:00
Seth Hall
098134d2fa Updated unit test baselines.
- Some (all?) of the DNS servers aren't being detected
  anymore because the test tracefile isn't long enough.
  Logging servers is delayed a 5 minutes in case a better
  result comes in.
2011-10-26 09:36:04 -04:00
Robin Sommer
4cdff8ffd8 Extending .gitignore other external test-suites as well. 2011-10-25 16:33:17 -07:00
Seth Hall
3d6d75b647 Updating test baselines for recent changes. 2011-10-25 14:51:32 -04:00
Seth Hall
320739e183 Updated/fixed MSIE version parsing in the software framework. 2011-10-25 09:30:06 -04:00
Robin Sommer
c8dfdb4492 Merge remote-tracking branch 'origin/topic/robin/interpreter-exceptions'
* origin/topic/robin/interpreter-exceptions:
  Adding test for new error handling.
  Experimental code to better handle interpreter errors.

This seems to work fine and it catches some potentially nasty crashes
so I'm merging it in even though it's not the final word on error
handling yet. #646 tracks the work scheduled for later.
2011-10-21 10:35:32 -07:00
Jon Siwek
24f3eb7fc2 Fix test failure due to some platforms joining stderr/stdout differently. 2011-10-17 13:53:10 -05:00
Jon Siwek
556b88e322 Tweaking notice suppression disable and notice policy order tests.
They should be less sensitive to script-layer changes now.
2011-10-14 10:47:32 -05:00
Robin Sommer
c81d428256 Adding test for new error handling. 2011-10-09 20:41:55 -07:00
Robin Sommer
bd9c937236 Fixing DNS memory leaks.
Some of the changes only clean up at termination to make perftools
happt, but there were some "real" leaks as well.

This fixes all DNS leaks I could reproducem, including most likely
what's reported in #534. Closing #534.

I'm also adding a new btest subdir core/leaks with tests requiring
perftools support. These don't compare against base lines but abort
whenever perftools reports a leak (with stack information to track it
down). Right now, these are passing.
2011-10-09 17:00:57 -07:00
Seth Hall
0803df2e14 Changed communication option from listen_encrypted to listen_ssl.
- Robin pointed out that SSL is providing authentication
  as well as encryption so listen_ssl is a more
  proper variable name.
2011-10-07 23:57:08 -04:00
Seth Hall
6d67f7830d Added to the likely_server_ports set for protocols with analyzers.
- Updated some tests since Bro is getting the direction
  correct now.

- Updated BPF filter test since I added a few ports to IRC
  as well.
2011-10-07 13:44:28 -04:00
Seth Hall
da9b8cc283 Modification to the Communication framework API.
- Simplified the communication API and made it easier to change
  to encrypted connections by not having separate variables to
  define encrypted and unencrypted ports.

- Now, to enable listening without configuring nodes just
  load the frameworks/communication/listen script.

- If encrypted listening is desired set the following:
	redef Communication::listen_encrypted=T;

- Accompanying test updates.
2011-10-07 13:29:26 -04:00
Robin Sommer
1ae94aae33 Baseline updates for conn compressor change. 2011-10-07 08:39:44 -07:00
Robin Sommer
9af6c183d2 Updating baselines for recent commits. 2011-10-06 19:04:26 -07:00
Robin Sommer
ea3dffa83c Fixing non-portable regexp match in test.
Also adding site/ to scripts excluded from bare mode check.
2011-10-06 19:04:03 -07:00
Jon Siwek
1cc675e30f Make CompHash computation/recovery for functions deterministic
Functions are now assigned a unique integer on construction which
CompositeHash can base hashes on.  Recovery then just involves
looking up the function pointer associated with that unique number.
2011-10-06 14:29:03 -05:00
Robin Sommer
fe77d385e0 Merge remote-tracking branch 'origin/topic/jsiwek/broctl-tweaks'
* origin/topic/jsiwek/broctl-tweaks:
  Consolidating some node-specific functionality from scripts in broctl repo.
2011-10-05 16:54:39 -07:00
Jon Siwek
88e089864b Consolidating some node-specific functionality from scripts in broctl repo. 2011-10-05 16:33:40 -05:00
Jon Siwek
357341c887 Changing some external testing scripts.
- The absolute path canonifier was overzealously canonifying relevant
  log fields, so it's no longer generally applied to diffing all
  baselines.  I don't think there's any logs that require local
  filesystem path names that aren't already tested by a unit test,
  but if any show up in the future, they can be canonified on a
  case-by-case basis.

- Removed some logs from being diff'd in the diff-all script
  because they're either already covered by a unit test
  (load_scripts.log) or because of difficulty/maintainenance
  tradeoff (prof.log).

Baselines for the external bro-testing repo still need updating.
2011-10-04 10:51:41 -05:00
Jon Siwek
8099640bc3 Fix the way HTTP tests were checking for weirds 2011-09-30 08:21:33 -05:00
Jon Siwek
71dc6b6de3 Fixing unit tests. 2011-09-30 07:53:23 -05:00
Seth Hall
012d8cfc5f Fix for shutdown bug in http scripts.
- The bug was introduced with the recent 1xx update.

- I updated some tests that seemed be written wrong.
2011-09-29 21:25:00 -04:00
Seth Hall
36dbaa5b92 Loaded scripts is indented with spaces now and makes more sense to look at.
- Updated a test to make it pass again.
2011-09-29 15:53:54 -04:00
Robin Sommer
4d6a90ce89 Merge remote-tracking branch 'origin/topic/jsiwek/http-1xx-replies'
* origin/topic/jsiwek/http-1xx-replies:
  Change logging of HTTP 1xx responses to occur in their own columns.
  Fix handling of HTTP 1xx response codes (addresses #411).
2011-09-28 17:10:40 -07:00
Robin Sommer
a84a422240 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Various unit test cleanup.
2011-09-28 16:54:23 -07:00
Jon Siwek
7af3977a50 Change logging of HTTP 1xx responses to occur in their own columns.
Instead of as entirely new log lines (addresses #411).
2011-09-27 14:15:23 -05:00
Jon Siwek
a71ab223c4 Various unit test cleanup.
Updated README and collected coverage-related tests in a common dir.

There are still coverage failures resulting from either the following
scripts not being @load'd in the default bro mode:

base/frameworks/time-machine/notice.bro
base/protocols/http/partial-content.bro
base/protocols/rpc/main.bro

Or the following result in errors when @load'd:

policy/protocols/conn/scan.bro
policy/hot.conn.bro

If these are all scripts-in-progress, can we move them all to live
outside the main scripts/ directory until they're ready?
2011-09-27 12:41:30 -05:00
Jon Siwek
64e821624b Fix handling of HTTP 1xx response codes (addresses #411).
Changed the parser to not treat 1xx response codes as a final answer
to an unanswered request -- a later response is still expected.

The scripting layer will also not finish a request-reply pair when
seeing 1xx's, instead it logs both the 1xx and final response messages
with associated information of the current request as they're seen.
2011-09-26 17:37:29 -05:00
Robin Sommer
03ffce66fe Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-25 14:15:52 -07:00
Seth Hall
827dcea586 Updating some test baselines.
- I see 5 broken tests currently.
2011-09-25 08:09:37 -04:00
Robin Sommer
d289db34db Communication fix and extension.
- Removing unnecessary log flushing. Closes #498.

- Adding new BiF disconnect() that shuts a connection to a peer down.

- terminate_connection() now first flushes any still buffered log
  messages.
2011-09-24 21:23:25 -07:00
Robin Sommer
a2edff9385 Updating baselines. 2011-09-22 19:52:11 -07:00
Robin Sommer
c9b9bab473 Merge remote-tracking branch 'origin/topic/seth/notice-suppression'
* origin/topic/seth/notice-suppression:
  Updated a notice related baseline and added a necessary @load line.
  Notice suppression clean up and notice/cluster integrtion fixes.
  Updates for notice suppression to use the &create_expire attribute
  Small, mostly cosmetic updates and fixing a test.
  Fix crash on exit (addresses #607).
  Duplicate notice suppression.

Closes #623.
2011-09-22 19:20:34 -07:00
Jon Siwek
d2118200ea Fixing unit tests and some minor bugs. 2011-09-22 12:42:16 -05:00
Seth Hall
d18fdef2d4 Merge remote-tracking branch 'origin/master' into topic/seth/notice-suppression 2011-09-21 02:26:19 -04:00
Seth Hall
664500226e Updated a notice related baseline and added a necessary @load line. 2011-09-20 12:19:22 -04:00
Seth Hall
412cdb16a0 Notice suppression clean up and notice/cluster integrtion fixes.
- Worker raised notices are printed a single time by the manager now.

- Cluster/notices integration cleaned up.

- New tests for cluster/notice integration.

- Notice suppression fixes and tests.
2011-09-19 12:05:13 -04:00
Seth Hall
acbfb6a425 Updates for notice suppression to use the &create_expire attribute
- The table tracking notice suppressions is now done with a table
  attribute instead of "manually" with scheduled events.

- The $suppress_for field can be set within PolicyItem's now too to
  affect the suppression interval through the notice policy.
2011-09-19 10:32:07 -04:00
Robin Sommer
c2e432c5fa Merge remote-tracking branch 'origin/topic/jsiwek/path-func-record-demote'
* origin/topic/jsiwek/path-func-record-demote:
  Fix filter path_func to allow record argument as a subset of stream's columns.

Conflicts:
	src/LogMgr.cc

Closes #600.
2011-09-15 16:45:41 -07:00
Robin Sommer
62581ede31 Merge remote-tracking branch 'origin/topic/jsiwek/filter-rotation'
* origin/topic/jsiwek/filter-rotation:
  Remove Log::rotation_control (addresses #572).
  Add an optional Log::RotationControl to Log::Filter records.

Closes #572.
2011-09-15 16:28:13 -07:00
Robin Sommer
8d10a76eba Merge remote-tracking branch 'origin/topic/jsiwek/index-opt-record'
* origin/topic/jsiwek/index-opt-record:
  Fix indexing for record types with optional fields

Closes #378.
2011-09-15 16:08:59 -07:00
Robin Sommer
9ee8a9f806 Testing/external scripts no longer compute MD5 checksums for SMTP
entities.

Before, whether they did depended on libmagic. To do that,
smpt/entities.bro gets a new option `never_calc_md5`.

Also restructuring the tests a bit so that load a common
testing-setup.bro scripts that can set a global configuration.
2011-09-15 15:42:10 -07:00
Robin Sommer
4bc18bd3f2 External tests no longer include the full content of mismatching files
in the diagnostics output.
2011-09-15 15:17:31 -07:00
Robin Sommer
ad313a8412 Updating test baselines for recent HTTP output changes. 2011-09-15 15:04:14 -07:00
Seth Hall
8006f26db2 Merge remote-tracking branch 'origin/master' into topic/seth/notice-suppression 2011-09-15 00:27:57 -04:00
Robin Sommer
6ffde1abc2 Updating baselines and testing helper script. 2011-09-12 12:12:47 -07:00
Seth Hall
e0af4f6e8d Small, mostly cosmetic updates and fixing a test.
- The test needed to append the second notice the event queue so that
  the notice would be suppressed correctly.

- Setting $suppress_for manually in apply_policy since it doesn't pick
  up the &default when directly creating the record inside the NOTICE call.
2011-09-12 15:08:25 -04:00
Robin Sommer
83783c5ca7 Bugfix for log writer.
It didn't escape binary stuff in some situations.

Closes #585.
2011-09-11 21:33:09 -07:00