mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

- Use `-b` most everywhere, it will save time. - Start some intel tests upon the input file being fully read instead of at an arbitrary time. - Improve termination condition for some sumstats/cluster tests. - Filter uninteresting output from some supervisor tests. - Test for `notice_policy.log` is no longer needed.
31 lines
594 B
Text
31 lines
594 B
Text
# @TEST-EXEC: btest-bg-run test1 zeek -b %INPUT
|
|
# @TEST-EXEC: btest-bg-wait 10
|
|
# @TEST-EXEC: mv test1/.stdout out
|
|
# @TEST-EXEC: btest-diff out
|
|
|
|
redef exit_only_after_terminate = T;
|
|
|
|
event zeek_init()
|
|
{
|
|
local h: addr = 127.0.0.1;
|
|
|
|
when ( local hname = lookup_addr(h) )
|
|
{
|
|
print "lookup successful";
|
|
terminate();
|
|
}
|
|
timeout 10sec
|
|
{
|
|
print "timeout (1)";
|
|
}
|
|
|
|
local to = 5sec;
|
|
# Just checking that timeouts can use arbitrary expressions...
|
|
when ( local hname2 = lookup_addr(h) ) {}
|
|
timeout to {}
|
|
when ( local hname3 = lookup_addr(h) ) {}
|
|
timeout to + 2sec {}
|
|
|
|
print "done";
|
|
}
|
|
|