mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
continue finetuning of interface + adjust tests.
streaming + re-reading do not seem to work completely correctly + there are still some strange random crashes.
This commit is contained in:
parent
e59aed6ce3
commit
29f56b4986
15 changed files with 251 additions and 86 deletions
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# @TEST-EXEC: bro %INPUT >out
|
||||
# @TEST-EXEC: bro -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
@TEST-START-FILE input.log
|
||||
|
@ -19,16 +19,13 @@
|
|||
|
||||
module A;
|
||||
|
||||
export {
|
||||
redef enum Input::ID += { INPUT };
|
||||
}
|
||||
|
||||
type Val: record {
|
||||
i: int;
|
||||
b: bool;
|
||||
};
|
||||
|
||||
event line(tpe: Input::Event, i: int, b: bool) {
|
||||
event line(description: Input::EventDescription, tpe: Input::Event, i: int, b: bool) {
|
||||
print description;
|
||||
print tpe;
|
||||
print i;
|
||||
print b;
|
||||
|
@ -36,6 +33,6 @@ event line(tpe: Input::Event, i: int, b: bool) {
|
|||
|
||||
event bro_init()
|
||||
{
|
||||
Input::create_stream(A::INPUT, [$source="input.log"]);
|
||||
Input::add_eventfilter(A::INPUT, [$name="input", $fields=Val, $ev=line]);
|
||||
Input::add_event([$source="input.log", $name="input", $fields=Val, $ev=line]);
|
||||
Input::remove("input");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue