diff --git a/src/detect-engine-mpm.c b/src/detect-engine-mpm.c index 595dd21256..139b2b15fd 100644 --- a/src/detect-engine-mpm.c +++ b/src/detect-engine-mpm.c @@ -62,7 +62,7 @@ #ifdef __SC_CUDA_SUPPORT__ #define PM MPM_B2G_CUDA #else -#define PM MPM_B2G +#define PM MPM_AC #endif #define POPULATE_MPM_AVOID_PACKET_MPM_PATTERNS 0x01 diff --git a/src/detect-engine.c b/src/detect-engine.c index e6ed137df0..b3310a39a4 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -815,6 +815,10 @@ static uint8_t DetectEngineCtxLoadConf(DetectEngineCtx *de_ctx) { } } + if (run_mode == RUNMODE_UNITTEST) { + de_ctx->sgh_mpm_context = ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL; + } + opt = NULL; switch (profile) { case ENGINE_PROFILE_LOW: diff --git a/src/suricata.h b/src/suricata.h index cd4f098c28..4db7d15d6c 100644 --- a/src/suricata.h +++ b/src/suricata.h @@ -146,5 +146,7 @@ void SignalHandlerSigusr2EngineShutdown(int); int RunmodeIsUnittests(void); +extern int run_mode; + #endif /* __SURICATA_H__ */