Merge remote-tracking branch 'anniebryan/notice-suppression-bug-fix'

* anniebryan/notice-suppression-bug-fix:
  Added test case with back-to-back notices
  Fix notice suppression atomicity bug
This commit is contained in:
Tim Wojtulewicz 2022-08-05 16:21:13 +00:00
commit 9524963da6
4 changed files with 11 additions and 3 deletions

View file

@ -10,7 +10,7 @@ redef enum Notice::Type += {
# The second notice needs to be scheduled due to how the notice framework
# uses the event queue.
event second_notice()
event third_notice()
{
NOTICE([$note=Test_Notice, $msg="another test", $identifier="static"]);
}
@ -18,6 +18,7 @@ event second_notice()
event zeek_init()
{
NOTICE([$note=Test_Notice, $msg="test", $identifier="static"]);
schedule 1msec { second_notice() };
NOTICE([$note=Test_Notice, $msg="test again", $identifier="static"]);
schedule 1msec { third_notice() };
}