-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add commandline option to simulate alert queue expand failure- v1 #7403
Conversation
For testing purposes. Meant to simulate a reallocation failure when dynamically growing the alert queue in DetectEngineThreadCtx, so we can check that Suri's behavior doesn't break under such circumstances. Task OISF#5319
@@ -221,7 +221,10 @@ void AlertQueueFree(DetectEngineThreadCtx *det_ctx) | |||
static uint16_t AlertQueueExpand(DetectEngineThreadCtx *det_ctx) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A check like below the start of the function would make more sense to me:
static uint16_t AlertQueueExpand(DetectEngineThreadCtx *det_ctx)
{
#ifdef DEBUG
if (unlikely(is_alert_queue_fail_mode))
return det_ctx->alert_queue_capacity;
#endif
... rest of the func ...
I think it would make sense to model the option after the work here https://github.com/OISF/suricata/pull/7393/files#diff-dc589ac7f5fdeb0157360264d2fa5a02574ee3359be4841a0a59f333d33e06abR116 |
ERROR: ERROR: QA failed on tlpw1_files_sha256. ERROR: QA failed on tlpr1_alerts_cmp. Pipeline 7472 |
Replaced by: #7527 |
To be used by the requires keyword to check for keyword support. Ticket: OISF#7403
For example: requires: keyword foo; Will require that Suricata supports the "foo" keyword. Ticket: OISF#7403
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/5319
Describe changes:
--disable-alert-queue-expand
that, when passed as an argument, will skip reallocating the alert queue, once it reaches packet alert max. This allows for one to test Suri behavior if reallocating fails.This must merged after #7396 as it exposes bug 5353
suricata-verify-pr: 825
OISF/suricata-verify#825