Commit graph

3257 commits

Author SHA1 Message Date
Jon Siwek
5ed13284c3 GH-165: Fix global initializations that indirectly use builtin types 2020-08-27 14:01:08 -07:00
Jon Siwek
4a8640d702 Improve how primary/top-level BIFs get initialized 2020-08-27 13:54:43 -07:00
Jon Siwek
1bbae2368d GH-1122: Allow initializing globals with calls to subdir BIFs 2020-08-27 12:20:37 -07:00
Jon Siwek
cf06ade325 GH-1122: Improve error for global record initialization exceptions 2020-08-26 14:24:36 -07:00
Jon Siwek
427a7de411 Merge remote-tracking branch 'origin/topic/timw/266-namespaces-part5'
- Did a few whitespace re-adjustments during merge

* origin/topic/timw/266-namespaces-part5:
  Update plugin btests for namespace changes
  Plugins: Clean up explicit uses of namespaces in places where they're not necessary.
  Base: Clean up explicit uses of namespaces in places where they're not necessary.
2020-08-25 19:51:42 -07:00
Jon Siwek
99d9a3a48c Fix closing timestamp of rotated log files in supervised-cluster mode 2020-08-25 17:06:10 -07:00
Jon Siwek
8d3c07b62a Improve an Intel framework btest
Relying on non-atomic `cp` operation may not cooperate well with the
Input framework file re-reading logic.
2020-08-25 14:36:52 -07:00
Tim Wojtulewicz
8012914c16 Merge remote-tracking branch 'origin/topic/robin/gh-574-processing-status'
* origin/topic/robin/gh-574-processing-status:
  Make set_processing_status() signal-safe.
2020-08-24 14:44:06 -07:00
Tim Wojtulewicz
b687730a01 Merge remote-tracking branch 'origin/topic/jsiwek/gh-710-expire-func-type-check'
* origin/topic/jsiwek/gh-710-expire-func-type-check:
  GH-710: Check that &expire_func is a function and not hook/event
2020-08-24 14:30:58 -07:00
Tim Wojtulewicz
60443e3178 Merge remote-tracking branch 'origin/topic/jsiwek/gh-594-improve-table-init-type-checking'
* origin/topic/jsiwek/gh-594-improve-table-init-type-checking:
  GH-594: Improve table initialization type-check error messages
2020-08-24 14:27:52 -07:00
Tim Wojtulewicz
874e170341 Update plugin btests for namespace changes 2020-08-24 12:07:03 -07:00
Robin Sommer
165dcacd98 Make set_processing_status() signal-safe.
Closes #574.
2020-08-24 10:26:58 +00:00
Jon Siwek
e1a39d27f3 GH-710: Check that &expire_func is a function and not hook/event 2020-08-21 15:42:51 -07:00
Jon Siwek
038fb1c08e Improve stability of config/cluster_resend btest 2020-08-20 16:26:46 -07:00
FlyingWithJerome
4a3396d525 add new line at the end of the test baseline 2020-08-20 09:04:56 -04:00
FlyingWithJerome
28576d3a84 add edns-cookie testcase 2020-08-20 09:04:56 -04:00
FlyingWithJerome
84d609b333 add testcases 2020-08-20 09:04:56 -04:00
Jon Siwek
164b1f6514 GH-594: Improve table initialization type-check error messages 2020-08-19 19:59:19 -07:00
Robin Sommer
45bef16be0 Catch if &add_func/&delete_func is applied to IDs that don't have values.
We do to allow adding &add_func to a global that's not immediately
initialized, as a later redef may fix that.

Closes #467.
2020-08-18 10:34:05 +00:00
Tim Wojtulewicz
b89935107d Merge remote-tracking branch 'origin/topic/timw/178-string-functions'
* origin/topic/timw/178-string-functions:
  GH-178: Add new string bif methods based on python string utilities
2020-08-14 10:00:29 -07:00
Johanna Amann
7f267d3e87 Merge remote-tracking branch 'origin/topic/jazoff/gh-1105'
* origin/topic/jazoff/gh-1105:
  Accept bracketed ipv6 addresses
2020-08-12 20:04:37 +00:00
Johanna Amann
123e45ca4e Merge remote-tracking branch 'origin/topic/seth/config-reader-musl-support'
* origin/topic/seth/config-reader-musl-support:
  Fix config reader regular expression for MUSL.
2020-08-12 19:50:43 +00:00
Tim Wojtulewicz
c6e7d14757 Merge remote-tracking branch 'origin/topic/timw/open-dict'
* origin/topic/timw/open-dict: (40 commits)
  Move Dict constants to detail namespace
  Add a few missing deprecation fixes
  Adjust Dict whitespace/style
  Adjust more btest timings
  Improve termination reliability/speed for brokerstore btests
  General btest cleanup
  Update NEWS about change in Dictionary implementation
  Improve Intel expire-item btest to be less time-sensitive
  Improve btests with unstable table/set output ordering
  Update doc submodule
  Adjust a few btests that were unstable due to time-sensitivity
  Fix DNS script deleting a table element while iterating
  Improve a brokerstore btest to filter out Broker connection messages
  Sort output of a few SumStats cluster tests
  Fix extract_first_email_addr() to really return the first email
  Add find_all_ordered() BIF
  Extend external test suite canonifier with set-sorting logic
  Update btests/baselines for OpenDict compat
  Fix new/malloc/delete/free mismatches in Dictionary code
  Add explanation for a Dict TODO item
  ...
2020-08-11 11:38:14 -07:00
Jon Siwek
ccf8e271a1 Adjust more btest timings 2020-08-11 11:26:22 -07:00
Jon Siwek
ec8c24b13b Improve termination reliability/speed for brokerstore btests 2020-08-11 11:26:22 -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
3ad306355f Improve Intel expire-item btest to be less time-sensitive 2020-08-11 11:26:21 -07:00
Jon Siwek
af2262ddff Improve btests with unstable table/set output ordering
Particularly, the final output order of a table/set is sensitive to
order of input/insertions and some tests were converting
std::unordered_{set,map} to Zeek table/set and iteration over those
standard containers may not always loop through elements in the same
order across all platforms.
2020-08-11 11:26:21 -07:00
Jon Siwek
48a243069c Adjust a few btests that were unstable due to time-sensitivity 2020-08-11 11:26:21 -07:00
Jon Siwek
f613cb0c68 Improve a brokerstore btest to filter out Broker connection messages 2020-08-11 11:26:21 -07:00
Jon Siwek
b96b1593d8 Sort output of a few SumStats cluster tests
The order of $epoch_result() function calls among all keys within a
single epoch isn't consequential.
2020-08-11 11:26:21 -07:00
Jon Siwek
170752fa99 Fix extract_first_email_addr() to really return the first email
The use of find_all() in extract_email_addrs_vec() extracted occurrences
to an intermediate set and thus lost any sense of ordering.

This changes extract_email_addrs_vec() to use find_all_ordered() and
return all occurrences of email addresses found in the argument,
included duplicates, with their order of occurrence preserved.
2020-08-11 11:26:21 -07:00
Jon Siwek
a852ab4c39 Add find_all_ordered() BIF
Operates similar to find_all(), except returns a vector instead of
set to allow preservation of order/duplicates.
2020-08-11 11:26:21 -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
94aee910d5 Update btests/baselines for OpenDict compat
Haven't checked different build configurations yet, but all except
a few SumStats tests are stable for me now.  The external tests
are also completely failing, but haven't looked at those yet.
2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
78298e99b7 Extend the timeouts on a few intel tests, update baselines 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
30fa514d30 Updating test baselines for new dictionary code due to changes in ordering of fields in the dictionary 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
5d764d6678 GH-178: Add new string bif methods based on python string utilities 2020-08-11 10:40:30 -07:00
Jon Siwek
747c681ecf Merge remote-tracking branch 'origin/topic/jsiwek/gh-1100-multipart-body-length'
* origin/topic/jsiwek/gh-1100-multipart-body-length:
  GH-1100: Fix reported body-length of HTTP messages w/ sub-entities
2020-08-10 09:58:01 -07:00
Tim Wojtulewicz
b8287a3375 Fix issue with sumstats script and fix baselines that were crashing previously 2020-08-09 21:13:12 -07:00
Tim Wojtulewicz
7496cf14c7 Extend the timeouts on a few intel tests, update baselines 2020-08-09 21:13:12 -07:00
Tim Wojtulewicz
21872aef39 Updating test baselines for new dictionary code due to changes in ordering of fields in the dictionary 2020-08-09 21:13:10 -07:00
Justin Azoff
211789bbb3 Accept bracketed ipv6 addresses 2020-08-05 17:18:36 -04:00
Jon Siwek
363b167bd2 GH-1100: Fix reported body-length of HTTP messages w/ sub-entities
The body-lengths of sub-entities, like multipart messages, got counted
twice by mistake: once upon the end of the sub-entity and then again
upon the end of the top-level entity that contains all sub-entities.
The size of just the top-level entity is the correct one to use.
2020-08-04 14:21:03 -07:00
Johanna Amann
8e99d4b170 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1080-error-on-enum-redefinition-conflict'
* origin/topic/jsiwek/gh-1080-error-on-enum-redefinition-conflict:
  Fix incorrect conflict detection of namespaced-enum-names
  Improve error message for an enum name conflicting with non-enum ID
  GH-1080: Treat enum name re-use across different enum types as an error
  GH-1080: Rename conflicting NetControl::DROP enum definitions

Fixes GH-1080
2020-08-04 20:25:40 +00:00
Seth Hall
7f4914c219 Fix config reader regular expression for MUSL.
It was not dealing with multiple spaces between the key and the value
with MUSL correctly. This change ensures that if a value exists, that it
begins and ends with a non-blank character.
2020-08-04 12:35:20 -04:00
Johanna Amann
22b401f52f Merge remote-tracking branch 'origin/topic/johanna/1095-just-get-rid-of-it'
* origin/topic/johanna/1095-just-get-rid-of-it:
  Re-add TYPE_COUNTER without function and deprecation marker.
  Completely remove all traces of the COUNTER type.
2020-08-03 10:44:43 -07:00
Jon Siwek
26ad26c101 Fix incorrect conflict detection of namespaced-enum-names
E.g. defining a `Foo::RED` enum name when a `GLOBAL::RED` identifier
already exists would previously be treated as an error, even though the
names don't truly conflict.
2020-07-31 16:44:49 -07:00
Jon Siwek
69c0cf1513 Improve error message for an enum name conflicting with non-enum ID 2020-07-31 16:24:26 -07:00
Jon Siwek
4a9567e04f GH-1080: Treat enum name re-use across different enum types as an error 2020-07-31 16:23:40 -07:00