ZAM-bif-tracking: Remove ZeroMQ dependency

Vern didn't have ZeroMQ installed and the test was skipped for him.
Generally would recommend anyone working on core Zeek to install
libzmq-dev or the equivalent for their environment, but until it is a
real required dependency, loosen the requirements on the test.
This commit is contained in:
Arne Welzel 2025-04-30 16:28:54 +02:00
parent d5e1dc27c6
commit 90eb22ce73
2 changed files with 11 additions and 3 deletions

View file

@ -1,2 +1,2 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
559 seen BiFs, 0 unseen BiFs (), 0 new BiFs ()
558 seen BiFs, 0 unseen BiFs (), 0 new BiFs ()

View file

@ -1,7 +1,6 @@
# @TEST-DOC: ZAM maintenance script for tracking changes in BiFs.
#
# @TEST-REQUIRES: have-spicy
# @TEST-REQUIRES: have-zeromq
#
# @TEST-EXEC: zeek -b %INPUT >output
# @TEST-EXEC: btest-diff output
@ -213,7 +212,6 @@ global known_BiFs = set(
"Telemetry::__histogram_observe",
"Telemetry::__histogram_sum",
"WebSocket::__configure_analyzer",
"Cluster::Backend::ZeroMQ::spawn_zmq_proxy_thread",
"__init_primary_bifs",
"__init_secondary_bifs",
"active_file",
@ -585,6 +583,13 @@ function fmt_str_set(s: set[string]): string
return set_str;
}
const ignored_module_patterns: table[pattern] of bool = {
# ZeroMQ is only an optional dependency and the BiFs it
# provides aren't performance critical, ignore it.
[/^Cluster::Backend::ZeroMQ.*/] = T,
};
event zeek_init()
{
local unseen_bifs = known_BiFs;
@ -597,6 +602,9 @@ event zeek_init()
# format to that plus their body.
fmt("%s", gi$value) == gn )
{
if ( |ignored_module_patterns[gn]| > 0 )
next;
if ( gn in unseen_bifs )
{
add seen_bifs[gn];