zeek/testing/btest/language/expire-expr-error.zeek
Jon Siwek 98d94ec785 Enable leak checks for btests that produce runtime exceptions
These were previously reporting leaks due to various allocations not
getting cleaned up during the stack unwind, but at the current state of
the transition toward IntrusivePtr usage, theses tests no longer leak.
2020-03-23 21:51:12 -07:00

27 lines
516 B
Text

# @TEST-EXEC: zeek -b %INPUT
# @TEST-EXEC: cp .stderr output
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output
redef exit_only_after_terminate = T;
global x: table[string] of interval;
global data: table[int] of string &create_expire=x["kaputt"];
global runs = 0;
event do_it()
{
print fmt("Run %s", runs);
++runs;
if ( runs < 4 )
schedule 1sec { do_it() };
else
terminate();
}
event zeek_init() &priority=-10
{
data[0] = "some data";
schedule 1sec { do_it() };
}