detect-engine: adjust unit tests for hs mpm

The Hyperscan MPM does match deduplication internally (using
HS_FLAG_SINGLEMATCH) and only returns the number of unique matches,
unlike AC.
pull/2115/head
Justin Viiret 10 years ago committed by Victor Julien
parent 68ddcdccde
commit 31d8d4b0a1

@ -2016,8 +2016,8 @@ static int DetectEngineHttpHeaderTest18(void)
/* start the search phase */
det_ctx->sgh = SigMatchSignaturesGetSgh(de_ctx, det_ctx, p);
uint32_t r = HttpHeaderPatternSearch(det_ctx, http_buf, http_len, STREAM_TOSERVER);
if (r != 2) {
printf("expected result 2, got %"PRIu32": ", r);
if (r < 1) {
printf("expected result >= 1, got %"PRIu32": ", r);
goto end;
}

@ -1888,8 +1888,8 @@ static int DetectEngineHttpRawHeaderTest18(void)
/* start the search phase */
det_ctx->sgh = SigMatchSignaturesGetSgh(de_ctx, det_ctx, p);
uint32_t r = HttpRawHeaderPatternSearch(det_ctx, http_buf, http_len, STREAM_TOSERVER);
if (r != 2) {
printf("expected result 2, got %"PRIu32": ", r);
if (r < 1) {
printf("expected result >= 1, got %"PRIu32": ", r);
goto end;
}

@ -2448,8 +2448,8 @@ static int DetectEngineHttpRawUriTest20(void)
/* start the search phase */
det_ctx->sgh = SigMatchSignaturesGetSgh(de_ctx, det_ctx, p1);
uint32_t r = HttpRawUriPatternSearch(det_ctx, http1_buf, http1_len, STREAM_TOSERVER);
if (r != 2) {
printf("expected 2 result, got %"PRIu32": ", r);
if (r < 1) {
printf("expected result >= 1, got %"PRIu32": ", r);
goto end;
}

Loading…
Cancel
Save