mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
Reorganizing btest/policy directory to match new scripts/ organization
Addresses #545
This commit is contained in:
parent
2eea193d79
commit
c3fb0ea035
134 changed files with 2 additions and 2 deletions
29
testing/btest/scripts/base/utils/thresholds.test
Normal file
29
testing/btest/scripts/base/utils/thresholds.test
Normal file
|
@ -0,0 +1,29 @@
|
|||
# @TEST-EXEC: bro %INPUT >output
|
||||
# @TEST-EXEC: btest-diff output
|
||||
|
||||
# This is loaded by default.
|
||||
#@load base/utils/thresholds
|
||||
|
||||
redef default_notice_thresholds = { 2, 4, 6, 8, 10 };
|
||||
const my_thresholds: vector of count = { 2, 4, 6, 8, 10 };
|
||||
const loop_v: vector of count = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
|
||||
global track_count: TrackCount;
|
||||
|
||||
for ( i in loop_v )
|
||||
{
|
||||
print fmt("Iteration: %s, threshold check: %s", i,
|
||||
check_threshold(my_thresholds, track_count));
|
||||
print track_count;
|
||||
++track_count$n;
|
||||
}
|
||||
|
||||
track_count$n = 0; track_count$index = 0;
|
||||
|
||||
print "====================================";
|
||||
for ( i in loop_v )
|
||||
{
|
||||
print fmt("Iteration: %s, threshold check: %s", i,
|
||||
default_check_threshold(track_count));
|
||||
print track_count;
|
||||
++track_count$n;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue