baseline & btest updates

This commit is contained in:
Vern Paxson 2022-05-05 11:44:37 -07:00 committed by Tim Wojtulewicz
parent 6dc711c39e
commit a9f67f52a5
6 changed files with 9 additions and 4 deletions

View file

@ -9,3 +9,4 @@ warning in <params>, line 1: event handler never invoked: SupervisorControl::sta
warning in <params>, line 1: event handler never invoked: SupervisorControl::stop_request
warning in <params>, line 1: event handler never invoked: spicy_analyzer_for_mime_type
warning in <params>, line 1: event handler never invoked: this_is_never_used
warning in <params>, line 1: event this_is_never_used (<...>/check-unused-event-handlers.test:5): cannot be invoked

View file

@ -1,2 +1,3 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
warning: event option_changed (<...>/option-runtime-errors.zeek:4): cannot be invoked
error in <...>/option-runtime-errors.zeek, line 7: Option::on_change needs function argument; not hook or event (Option::set_change_handler(A, to_any_coerceoption_changed, (coerce 0 to int)))

View file

@ -14,4 +14,4 @@ error in port and <...>/table-type-checking.zeek, line 42: type clash (port and
error in <...>/table-type-checking.zeek, line 42: inconsistent types in table constructor (table(thousand-two = 1002))
error in <...>/table-type-checking.zeek, line 48: type clash in assignment (lea = table(thousand-three = 1003))
error in count and <...>/table-type-checking.zeek, line 54: arithmetic mixed with non-arithmetic (count and foo)
error in <...>/table-type-checking.zeek, line 4 and <...>/table-type-checking.zeek, line 54: &default value has inconsistent type (MyTable and table()&default=foo, &optional)
error in <...>/table-type-checking.zeek, line 4 and <...>/table-type-checking.zeek, line 54: &default value has inconsistent type (table[port] of count and table()&default=foo, &optional)

View file

@ -1,7 +1,7 @@
# This test should print a warning that the event handler is never invoked.
# @TEST-REQUIRES: $SCRIPTS/have-spicy # This test logs uninvoked event handlers, so disable it if Spicy and its plugin is unavailable.
# @TEST-EXEC: zeek -b %INPUT check_for_unused_event_handlers=T
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff .stderr
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort-and-remove-abspath btest-diff .stderr
event this_is_never_used()
{

View file

@ -76,7 +76,7 @@ type myfunctype: function(c: count) : function(d: count) : count;
global global_with_same_name = 100;
global pong: event(msg: string, f: myfunctype);
global pong: event(msg: string, f: myfunctype) &is_used;
# This is one, of many, ways to declare your functions that you plan to receive.
# All you are doing is giving the parser a version of their body, so they can be
@ -116,7 +116,7 @@ event Broker::peer_lost(endpoint: Broker::EndpointInfo, msg: string)
global n = 0;
event ping(msg: string, f: myfunctype)
event ping(msg: string, f: myfunctype) &is_used
{
print fmt("receiver got ping: %s", msg);
++n;

View file

@ -0,0 +1,3 @@
#! /usr/bin/env bash
#
diff-sort | diff-remove-abspath