zeek/testing/btest/core/expr-exception.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

25 lines
627 B
Text

# Expressions in an event handler that raise interpreter exceptions
# shouldn't abort Zeek entirely, but just return from the function body.
#
# @TEST-EXEC: zeek -r $TRACES/wikipedia.trace %INPUT >output
# @TEST-EXEC: TEST_DIFF_CANONIFIER="$SCRIPTS/diff-remove-abspath | $SCRIPTS/diff-remove-timestamps" btest-diff reporter.log
# @TEST-EXEC: btest-diff output
event connection_established(c: connection)
{
print c$ftp;
print "not reached";
}
event connection_established(c: connection)
{
if ( c?$ftp )
print c$ftp;
else
print "ftp field missing";
}
event connection_established(c: connection)
{
print c$id;
}