Commit graph

11715 commits

Author SHA1 Message Date
Jon Siwek
4ae056b1a3 Escape non-printables in "unrecognized character" parser error messages 2021-04-08 20:14:49 -07:00
Jon Siwek
25dcf210b1 Disable Broker tests in Coverity Scan cronjob build
Coverity has trouble analyzing them and they're contributing to
bringing the overall successfully-analyzed-compilation-unit ratio
below the required 85%.
2021-04-07 18:34:12 -07:00
Jon Siwek
c9874be22a Merge remote-tracking branch 'origin/topic/timw/1493-mobile-ipv6'
* origin/topic/timw/1493-mobile-ipv6:
  GH-1493: Fix build with -DENABLE_MOBILE_IPV6
2021-04-07 15:54:40 -07:00
Tim Wojtulewicz
6c52fd502f GH-1493: Fix build with -DENABLE_MOBILE_IPV6 2021-04-07 13:44:18 -07:00
Tim Wojtulewicz
2f69e32233 Merge remote-tracking branch 'origin/topic/jsiwek/intrusiveptr-hash'
* origin/topic/jsiwek/intrusiveptr-hash:
  Change TableVal::ToMap() to return ValPtr-indexed maps
  Add std::hash specialization for IntrusivePtr
  Move IntrusivePtr relational operators to zeek namespace
2021-04-07 11:13:05 -07:00
zeek-bot
ea8367713b Update doc submodule [nomail] [skip ci] 2021-04-06 00:35:10 +00:00
Jon Siwek
cd8f19328a Merge remote-tracking branch 'origin/topic/neverlord/gh-1408'
- Minor adjustments to header includes, whitespace, and a
  compiler warning fix during merge

* origin/topic/neverlord/gh-1408:
  Add new Timer class to the telemetry API
  Fix build with latest VectorVal API
  Update baselines
  Prefix telemetry BIFs with __
  Expose telemetry API to scripting land
  Add handle types for histogram metrics
  Move duplicated code to detail header
  Adhere to Zeek coding style
  Apply suggestions from code review
  Add telemetry Manager to Zeek setup / teardown
  Add missing whitespaces for Zeek coding style
  Add gauge metric types
  Add scaffold for new metrics API with counters
2021-04-05 14:21:44 -07:00
zeek-bot
9b0126e107 Update doc submodule [nomail] [skip ci] 2021-04-04 00:37:56 +00:00
Jon Siwek
c0b8fc4d60 Change TableVal::ToMap() to return ValPtr-indexed maps 2021-04-03 10:08:02 -07:00
Jon Siwek
583310f6dd Add std::hash specialization for IntrusivePtr 2021-04-03 10:08:02 -07:00
Jon Siwek
cffc8fa13c Move IntrusivePtr relational operators to zeek namespace
Otherwise some cases relying on argument-dependent lookup (ADL) fail.
2021-04-03 09:46:22 -07:00
Jon Siwek
e6955d55dd Increase timeout of plugins.reader btest 2021-04-03 09:40:45 -07:00
Jon Siwek
8b498477d4 Merge remote-tracking branch 'origin/topic/vern/cpp-prep2'
* origin/topic/vern/cpp-prep2:
  Avoid a redundant set operation in ProfileFuncs::MergeInProfile()
  Use std::move() where possible in parse.y build_local()/build_global()
  optionally hash original, not extended, form of records for profiling profile types associated with global initializations incorporate type name, if present, into type hash
  fixed out-of-range enum constant
  method to add a fully-qualified enum name (module name included)
  enum types track whether they've had values added via "redef"
  tracking of original size of records (pre redef'ing)
  Added TableVal::ToMap to retrieve a table's entire contents as a unordered_map
  micro whitespace nit
  factoring out some replicated code in the parser
  some micro-preening of parse.y; no semantic changes
  for readability, removed explicit scoping in parse.y; no semantic changes
2021-04-03 09:36:29 -07:00
Jon Siwek
d57848828e Avoid a redundant set operation in ProfileFuncs::MergeInProfile() 2021-04-02 11:55:22 -07:00
Jon Siwek
5ffe25fca8 Use std::move() where possible in parse.y build_local()/build_global() 2021-04-02 11:38:25 -07:00
Vern Paxson
0b45ff2179 optionally hash original, not extended, form of records for profiling
profile types associated with global initializations
incorporate type name, if present, into type hash
2021-04-01 20:20:12 -07:00
Vern Paxson
0f18a01bf7 fixed out-of-range enum constant 2021-04-01 19:16:07 -07:00
Vern Paxson
9557029cf2 method to add a fully-qualified enum name (module name included) 2021-04-01 18:45:42 -07:00
Vern Paxson
341c284de9 enum types track whether they've had values added via "redef" 2021-04-01 18:38:58 -07:00
Vern Paxson
45004872e8 tracking of original size of records (pre redef'ing) 2021-04-01 17:38:31 -07:00
Vern Paxson
6e8baafeb9 Added TableVal::ToMap to retrieve a table's entire contents as a unordered_map 2021-04-01 17:33:37 -07:00
Vern Paxson
4aa73f6f7d micro whitespace nit 2021-04-01 17:33:03 -07:00
Vern Paxson
c92af1e542 factoring out some replicated code in the parser 2021-04-01 17:32:22 -07:00
Vern Paxson
9cdb51e283 some micro-preening of parse.y; no semantic changes 2021-04-01 16:30:48 -07:00
Vern Paxson
e1eb233bbd for readability, removed explicit scoping in parse.y; no semantic changes 2021-04-01 16:27:08 -07:00
Jon Siwek
fe6fd61468 Merge remote-tracking branch 'origin/topic/vern/cpp-prep-profiling'
* origin/topic/vern/cpp-prep-profiling:
  Add missing errno include to ProfileFunc.cc
  Adjust GetAttrs() usage in ProfileFunc::PreExpr() to const-reference
  Fix whitespace in ProfileFunc::PreExpr()
  Avoid redundant map/set searches in various ProfileFunc methods
  Improve detail::script_specific_filename()
  Use std::string_view in p_hash() to avoid string copies
  function profiling rewritten - more detailed info, supports global profiling
  track whether a given function/body should be included/skipped for optimization
2021-04-01 14:14:59 -07:00
Jon Siwek
be21843859 Add missing errno include to ProfileFunc.cc 2021-03-31 15:14:27 -07:00
Jon Siwek
bdadbabf18 Adjust GetAttrs() usage in ProfileFunc::PreExpr() to const-reference 2021-03-31 14:52:01 -07:00
Jon Siwek
dc9e7f6d03 Fix whitespace in ProfileFunc::PreExpr() 2021-03-31 14:50:45 -07:00
Jon Siwek
ccd27a3dfa Avoid redundant map/set searches in various ProfileFunc methods 2021-03-31 14:48:02 -07:00
Jon Siwek
ab1f1f8360 Improve detail::script_specific_filename()
- To handle relative paths that don't start with a '.'
- To handle getcwd() failures
2021-03-31 14:18:36 -07:00
Jon Siwek
d3261238dd Use std::string_view in p_hash() to avoid string copies 2021-03-31 13:22:50 -07:00
Jon Siwek
fb33597372 Merge branch 'master' into topic/vern/cpp-prep-profiling 2021-03-31 12:02:17 -07:00
Jon Siwek
2beaee9318 Add ssh to Alpine Dockerfile for retrieving external test repos 2021-03-31 11:59:04 -07:00
Jon Siwek
3404e4a3d1 Update submodule(s) [nomail] [skip ci] 2021-03-31 11:09:04 -07:00
Jon Siwek
631f19377e Change ci/init-external-repos.sh to use base64 -d
The BusyBox version of `base64` does not have `--decode`.
2021-03-31 10:48:07 -07:00
Jon Siwek
ade37c1dfc Teach ci/init-external-repos.sh to consider user permissions
Any errors while setting up external/private test repo should fail the
task for PRs submitted by a user with write/admin permission.
2021-03-31 10:31:39 -07:00
Jon Siwek
f75da8bb08 Merge remote-tracking branch 'origin/topic/johanna/opensuse-leap'
* origin/topic/johanna/opensuse-leap:
  CI: Add OpenSUSE Leap 15.2
2021-03-31 09:56:30 -07:00
Jon Siwek
ba7b645a9e Merge remote-tracking branch 'origin/topic/jsiwek/ci-alpine'
* origin/topic/jsiwek/ci-alpine:
  Add CI task for Alpine Linux
  Separate stdout from stderr in btest baselines
  Remove newline-eof canonification attempt in diff-remove-timestamps
  Change a <sys/errno.h> include to <errno.h>
2021-03-31 09:54:54 -07:00
Johanna Amann
2f39b66828 CI: Add OpenSUSE Leap 15.2 2021-03-31 16:00:33 +01:00
Jon Siwek
3f95abd0dd Add CI task for Alpine Linux 2021-03-30 17:18:52 -07:00
Jon Siwek
3e9ac00f21 Separate stdout from stderr in btest baselines
Redirecting both to the same file can show platform-specific differences
(e.g. Alpine), likely due to different buffering defaults.
2021-03-30 16:23:23 -07:00
Jon Siwek
8e47494dff Remove newline-eof canonification attempt in diff-remove-timestamps
On Alpine (BusyBox `sed`), the previous `sed -e '$a\'` invocation always
added a newline, breaking most every diff.  There doesn't seem to be a
need to attempt normalizing EOF newlines at the moment and doing it that
way doesn't seem to be portable anyway.  If canonifiers need to be
portable, `sed` should be treated as a text-processing tool and POSIX
definition of text-file is zero or more newline-terminated
character-sequences, so if canonification of Baselines via `sed` is
required, those Baselines should always end with a newline to be
considered text files.  I.e. that's not the job of this canonifier, and
changing it also doesn't necessarily generalize since it could be
considered coincidental that diff-remove-timestamps in particular is the
default canonifier that's commonly used while there's still others that
also make use of `sed`.
2021-03-30 16:04:34 -07:00
Jon Siwek
a15d726f95 Change a <sys/errno.h> include to <errno.h>
Some systems (e.g. Alpine) may warn that that the former is incorrect.
2021-03-30 16:03:14 -07:00
Jon Siwek
75ebc5bca1 Merge branch 'fix_timeval' of https://github.com/abenson/zeek
* 'fix_timeval' of https://github.com/abenson/zeek:
  Fix incomplete-type for struct timeval
2021-03-30 14:58:00 -07:00
Andrew Benson
2ad482535e Fix incomplete-type for struct timeval 2021-03-29 22:41:31 -05:00
Jon Siwek
c033bd20aa Merge remote-tracking branch 'origin/topic/vern/global-stmts'
* origin/topic/vern/global-stmts:
  whitespace adjustment
  "balance" tests with multiple Zeek scripts to load the same elements
  put global statements into a quasi-function to support script optimization
2021-03-29 15:42:43 -07:00
Jon Siwek
b5d1c4342e Merge remote-tracking branch 'origin/topic/jsiwek/misc-val-tweaks'
* origin/topic/jsiwek/misc-val-tweaks:
  Fix sign-compare compiler warning in coerce_to_record()
  Fix maybe-uninitialized warning in ZVal::ToVal()
  Change RecordVal::GetFieldAs() to use std::vector::operator[]
  Add RecordVal::AssignField() and use it in supervisor code
2021-03-29 13:19:57 -07:00
Jon Siwek
e7b8609613 Merge remote-tracking branch 'origin/topic/jsiwek/gh-960-auxil-include-order'
* origin/topic/jsiwek/gh-960-auxil-include-order:
  GH-960: Fix include order of bundled header files
2021-03-29 13:15:51 -07:00
Dominik Charousset
27a39941db Add new Timer class to the telemetry API 2021-03-29 12:02:13 +02:00