mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00

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.
24 lines
826 B
Text
24 lines
826 B
Text
# @TEST-EXEC: ${DIST}/aux/zeek-aux/plugin-support/init-plugin -u . Reporter Hook
|
|
# @TEST-EXEC: cp -r %DIR/reporter-hook-plugin/* .
|
|
# @TEST-EXEC: ./configure --zeek-dist=${DIST} && make
|
|
# @TEST-EXEC: ZEEK_PLUGIN_ACTIVATE="Reporter::Hook" ZEEK_PLUGIN_PATH=`pwd` zeek -b %INPUT 2>&1 | $SCRIPTS/diff-remove-abspath | sort | uniq >output
|
|
# @TEST-EXEC: btest-diff output
|
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER="$SCRIPTS/diff-remove-abspath | $SCRIPTS/diff-remove-timestamps" btest-diff reporter.log
|
|
|
|
@load base/frameworks/reporter
|
|
|
|
type TestType: record {
|
|
a: bool &optional;
|
|
};
|
|
|
|
event zeek_init()
|
|
{
|
|
Reporter::info("Some Info");
|
|
Reporter::warning("A warning");
|
|
Reporter::error("An Error");
|
|
Reporter::error("An Error that does not show up in the log");
|
|
|
|
# And just trigger a runtime problem.
|
|
local b = TestType();
|
|
print b$a;
|
|
}
|