Update BiF-tracking, add get_current_packet_ts()

Also, run the ZAM-bif-tracking test in non-ZAM environments so
failures are caught immediately. There's nothing overly ZAM specific about
running this test.

I'm not sure I like the fact that any new contributor adding a BiF
will need to dig into this... it might be a bit intimidating.
This commit is contained in:
Arne Welzel 2024-12-10 19:51:45 +01:00
parent 77465a90b5
commit 7449b050b3
3 changed files with 5 additions and 2 deletions

View file

@ -268,6 +268,7 @@ static std::unordered_map<std::string, unsigned int> func_attrs = {
{"get_current_conn_packets_threshold", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"get_current_conn_packets_threshold", ATTR_NO_ZEEK_SIDE_EFFECTS},
{"get_current_packet", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"get_current_packet", ATTR_NO_ZEEK_SIDE_EFFECTS},
{"get_current_packet_header", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"get_current_packet_header", ATTR_NO_ZEEK_SIDE_EFFECTS},
{"get_current_packet_ts", ATTR_NO_ZEEK_SIDE_EFFECTS},
{"get_dns_stats", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"get_dns_stats", ATTR_NO_ZEEK_SIDE_EFFECTS},
{"get_event_handler_stats", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"get_event_handler_stats", ATTR_NO_ZEEK_SIDE_EFFECTS},
{"get_event_stats", ATTR_NO_ZEEK_SIDE_EFFECTS}, {"get_event_stats", ATTR_NO_ZEEK_SIDE_EFFECTS},

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. ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
540 seen BiFs, 0 unseen BiFs (), 0 new BiFs () 541 seen BiFs, 0 unseen BiFs (), 0 new BiFs ()

View file

@ -1,5 +1,6 @@
# @TEST-DOC: ZAM maintenance script for tracking changes in BiFs. # @TEST-DOC: ZAM maintenance script for tracking changes in BiFs.
# @TEST-REQUIRES: test "${ZEEK_ZAM}" = "1" #
# @TEST-REQUIRES: have-spicy
# #
# @TEST-EXEC: zeek -b %INPUT >output # @TEST-EXEC: zeek -b %INPUT >output
# @TEST-EXEC: btest-diff output # @TEST-EXEC: btest-diff output
@ -299,6 +300,7 @@ global known_BiFs = set(
"get_current_conn_packets_threshold", "get_current_conn_packets_threshold",
"get_current_packet", "get_current_packet",
"get_current_packet_header", "get_current_packet_header",
"get_current_packet_ts",
"get_dns_stats", "get_dns_stats",
"get_event_handler_stats", "get_event_handler_stats",
"get_event_stats", "get_event_stats",