Commit graph

137 commits

Author SHA1 Message Date
Johanna Amann
442cb40db8 Fix binary baseline & line-end problem
By default all baslines are run through diff-remove-timestamp. On a BSD
sed implementation, this means that a newline is added to the end of the
file, if no newline was there originally. This behavior differs from GNU
sed, which does not add a newline.

In this commit we unify this behavior by always adding a newline, even
when using GNU sed. This commit also disables the canonifier for a bunch
of binary baselines, so we do not have to change them.
2020-12-06 20:19:52 -08:00
Johanna Amann
7040e30431 Fix diff-remove-abspath on OSX
\t does not work on OS-X and just matches the letter t. This commit
replaces it with a literal tab instead.
2020-12-06 20:19:52 -08:00
Christian Kreibich
c0bd02e18f Canonifier improvements for the scripts.base.frameworks.logging.ascii-double test
This now more surgically applies canonifiers so that the double-format
numerical output isn't itself canonified.
2020-12-06 20:19:52 -08:00
Christian Kreibich
3984d99a86 Make diff-remove-abspath canonifier match on non-whitespace paths only
This avoids swallowing multiple separate paths separated by unrelated
content into one substitution, like here:

orig_p=59856<...>/tcp] -> orig_p=59856/tcp, resp_h=192.150.187.43, resp_p=80/tcp]
2020-12-06 18:19:06 -08:00
Christian Kreibich
3ca804421e Harden diff-remove-timestamps canonifier
This pattern got mislead by matching suffixes of other numbers, and
noramlizing exact 0-timestamps isn't really required.

- Remove eplicit "0.000000" number pattern from timestamp normalization

- Require beginning of line or non-numeric character before the
  beginning of the number replacement
2020-12-06 18:19:06 -08:00
Jon Siwek
7d68f2ce9d Remove Python 2 compatibility logic in httpd test script 2020-11-25 14:57:09 -08:00
Jon Siwek
9717c623c2 Update Python invocations to explicit python3 2020-11-25 14:57:09 -08:00
Jon Siwek
a7b905d389 GH-1149: Add GitHub Action to automate generation of zeek-docs 2020-09-01 17:52:00 -07:00
Jon Siwek
7967a5b0aa General btest cleanup
- Use `-b` most everywhere, it will save time.

- Start some intel tests upon the input file being fully read instead of
  at an arbitrary time.

- Improve termination condition for some sumstats/cluster tests.

- Filter uninteresting output from some supervisor tests.

- Test for `notice_policy.log` is no longer needed.
2020-08-11 11:26:22 -07:00
Jon Siwek
67835a6520 Extend external test suite canonifier with set-sorting logic
Two new canonifiers: one to sort the contents of conn.log "service"
field and another to sort the contents of any field of type "set".
2020-08-11 11:26:21 -07:00
Jon Siwek
cd9fec7bdb Add Cirrus CI config 2019-12-17 15:28:25 -08:00
Jon Siwek
9941537481 Run doctest unit tests in Travis CI 2019-11-15 16:14:43 -08:00
Jon Siwek
9e83abc5d9 Fix indents/whitespace in Travis CI script 2019-11-15 16:14:43 -08:00
Jon Siwek
8d31baf3b7 Fix Travis CI script to run Coverity build in container
It was previously running on the host and didn't have adequate compiler
to do C++17.
2019-10-31 12:09:18 -07:00
Jon Siwek
36d7628bcb Install cmake3 from EPEL on CentOS CI system 2019-10-28 20:18:45 -07:00
Jon Siwek
08e2f97393 Update Travis CI config for C++17
Several platforms didn't have a C++17 compiler in their default repos.

Also moved from Fedora 28 to Fedora 30 since that will soon be the
oldest, still-supported version.
2019-10-24 22:27:54 -07:00
Tim Wojtulewicz
b9f6992c0e fixup! Add new distro to Travis CI configuration for running leak tests 2019-08-09 11:01:16 -07:00
Tim Wojtulewicz
80e3c42526 Add new distro to Travis CI configuration for running leak tests 2019-08-08 16:36:17 -07:00
Jon Siwek
9698d8d7cc Remove --disable-perftools from coverity builds 2019-07-23 09:38:16 -07:00
Jon Siwek
50e4da74cf Fix canonification of timestamps with a decisecond multiple
Unit tests sometimes use current_time(), which occassionally lands on
a perfect tenth of a second and end up fooling the old canonification
regexp and resulting in output which differs from what's in the
test baseline.
2019-07-12 18:24:56 -07:00
Jon Siwek
580822a32c Merge remote-tracking branch 'origin/topic/dnthayer/gh-339'
* origin/topic/dnthayer/gh-339:
  Rename all BRO-prefixed environment variables
2019-05-23 20:23:14 -07:00
Daniel Thayer
1a74516db1 Rename all BRO-prefixed environment variables
For backward compatibility when reading values, we first check
the ZEEK-prefixed value, and if not set, then check the corresponding
BRO-prefixed value.
2019-05-22 00:12:31 -05:00
Daniel Thayer
3f9e7138bd More bro-to-zeek renaming in the unit tests 2019-05-16 02:27:54 -05:00
Jon Siwek
6ad7099f7e Merge remote-tracking branch 'origin/topic/robin/gh-239'
* origin/topic/robin/gh-239:
  Undo a change to btest.cfg from a recent commit
  Updating submodule.
  Fix zeek-wrapper
  Update for renaming BroControl to ZeekControl.
  Updating submodule.
  GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
2019-05-14 13:27:40 -07:00
Robin Sommer
89b8d6e7ba Update for renaming BroControl to ZeekControl. 2019-05-06 21:22:19 +00:00
Jon Siwek
84ca12fdb4 Rename Zeexygen to Zeekygen 2019-05-02 21:39:21 -07:00
Robin Sommer
789cb376fd GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
This also installs symlinks from "zeek" and "bro-config" to a wrapper
script that prints a deprecation warning.

The btests pass, but this is still WIP. broctl renaming is still
missing.

#239
2019-05-01 21:43:45 +00:00
Jon Siwek
aebcb1415d GH-234: rename Broxygen to Zeexygen along with roles/directives
* All "Broxygen" usages have been replaced in
  code, documentation, filenames, etc.

* Sphinx roles/directives like ":bro:see" are now ":zeek:see"

* The "--broxygen" command-line option is now "--zeexygen"
2019-04-22 19:45:50 -07:00
Jon Siwek
a994be9eeb Merge remote-tracking branch 'origin/topic/seth/zeek_init'
* origin/topic/seth/zeek_init:
  Some more testing fixes.
  Update docs and tests for bro_(init|done) -> zeek_(init|done)
  Implement the zeek_init handler.
2019-04-19 11:24:29 -07:00
Jon Siwek
1e57e3f026 Use .zeek file suffix in unit tests 2019-04-16 16:08:57 -07:00
Seth Hall
5db766bd88 Update docs and tests for bro_(init|done) -> zeek_(init|done) 2019-04-14 08:49:12 -04:00
Jon Siwek
9c843a7d83 Add script to update external test repo commit pointers
It will prompt to update the file storing the external test repo
commit hash when a change is detected upon running update-changes.
2019-04-05 17:09:01 -07:00
Jon Siwek
67484a90fa GH-211: improve consistency of how scripting errors are handled
Scripting errors/mistakes now consistently generate a runtime error
which have the behavior of unwinding the call stack all the way out of
the current event handler.

Before, such errors were not treated consistently and either aborted
the process entirely or emitted a message while continuing to execute
subsequent statements without well-defined behavior (possibly causing
a cascade of errors).

The previous behavior also would only unwind out of the current
function (if within a function body), not out the current event
handler, which is especially problematic for functions that return
a value: the caller is essentially left a mess with no way to deal
with it.

This also changes the behavior of the startup/initialization process
to abort if there's errors during bro_init() rather than continue one
to the main run loop.  The `allow_init_errors` option may change this
new, default behavior.
2019-01-30 11:20:09 -06:00
Jon Siwek
2ff746fea7 Change doc/ subdir into a git submodule
The docs now live at https://github.com/zeek/zeek-docs
2019-01-17 14:15:45 -06:00
Jon Siwek
7e9d48f532 Remove broxygen Sphinx integration
The broxygen-generated files now live in the git repo, have tests
that check that they are up-to-date, and a script to re-generate
them on-demand.
2018-12-18 10:15:22 -06:00
Jon Siwek
f287b2bdf9 Fix Travis git clone command 2018-12-07 07:27:42 -06:00
Jon Siwek
34e577c4f0 Update external test suite locations 2018-12-06 20:11:57 -06:00
Jon Siwek
802b4f876e Improve Travis script to show multiple core dump stacks 2018-11-02 09:39:01 -05:00
Jon Siwek
8544508d33 Fix Travis script typo 2018-11-01 20:39:33 -05:00
Jon Siwek
53f4e09342 Add more debug output to Travis script 2018-11-01 19:58:03 -05:00
Jon Siwek
5ddb2b37c0 Add core file search and stack trace output for Travis builds 2018-11-01 18:36:31 -05:00
Daniel Thayer
3f3344d007 Add krb5 devel package to Travis docker containers
Added the kerberos devel package to the debian-based docker containers
so that fewer tests are skipped.
2018-09-05 18:07:42 -05:00
Daniel Thayer
419b5d9ee0 Improve readability of the Travis job log
Use quiet mode in git checkout to suppress a dozen lines of output.
Also added a blank line of output just before attempting to get the
private tests.
2018-08-23 12:27:08 -05:00
Jon Siwek
ef3d451af3 Fix Travis CI script to checkout particular commits of external tests 2018-08-21 16:49:06 -05:00
Jon Siwek
bcf97f70ea Merge remote-tracking branch 'origin/topic/jsiwek/empty-lines'
* origin/topic/jsiwek/empty-lines:
  Add 'smtp_excessive_pending_cmds' weird
  Fix SMTP command string comparisons
  Improve handling of empty lines in several text protocol analyzers
  Add rate-limiting sampling mechanism for weird events
  Teach timestamp canonifier about timestamps before ~2001
2018-08-20 15:35:16 -05:00
Jon Siwek
4912513517 Improve diff-remove-abspath canonifier: collapse '/' sequences 2018-08-20 12:47:57 -05:00
Daniel Thayer
5d3ef4daf4 Improve the travis-job script to work outside of Travis
Improved the travis-job test script so that it works outside of Travis.
This can be useful to test changes to the docker container config before
pushing to master, for testing changes on a branch, or for debugging
some problem with the tests running on Travis.  This required the
following changes:
-The script no longer requires the TRAVIS env. variable to be set.
-Added an "all" command as a more convenient way to run all steps in a
 build.
-Added a "coverity" command-line option to do a coverity build.
-Before building Bro or downloading coverity tools, do a cleanup from any
 previous build.

Also other minor improvements (code comments, reorganization, etc.).
2018-08-09 14:00:55 -05:00
Daniel Thayer
29c179c30d Improve a travis output message in pull request builds
The output message is now more explicit and doesn't look like an
error message.
2018-08-02 16:13:42 -05:00
Daniel Thayer
8c8b55cd18 Use default version of OpenSSL on all travis docker containers 2018-08-02 15:44:47 -05:00
Johanna Amann
a251b32d85 Merge remote-tracking branch 'origin/topic/jsiwek/openssl-1.1'
* origin/topic/jsiwek/openssl-1.1:
  Update install instructions for OpenSSL 1.1 compat
  Remove requestorName parameter of ocsp_request event
  Adjust x509 unit tests to work around OpenSSL 1.0 vs. 1.1 differences
  Fixes for OpenSSL 1.1 support
2018-07-31 13:13:06 +02:00