suricata
detect-bsize.c File Reference
#include "../util-unittest.h"
Include dependency graph for detect-bsize.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TEST_OK(str, m, lo, hi)
 
#define TEST_FAIL(str)
 
#define TEST_OK(rule)
 
#define TEST_FAIL(rule)
 

Macro Definition Documentation

◆ TEST_FAIL [1/2]

#define TEST_FAIL (   rule)
Value:
{ \
DetectEngineCtx *de_ctx = DetectEngineCtxInit(); \
FAIL_IF_NULL(de_ctx); \
Signature *s = DetectEngineAppendSig(de_ctx, (rule)); \
FAIL_IF_NOT_NULL(s); \
DetectEngineCtxFree(de_ctx); \
}

Definition at line 106 of file detect-bsize.c.

◆ TEST_FAIL [2/2]

#define TEST_FAIL (   str)
Value:
{ \
DetectBsizeData *bsz = DetectBsizeParse((str)); \
FAIL_IF_NOT_NULL(bsz); \
}

Definition at line 106 of file detect-bsize.c.

◆ TEST_OK [1/2]

#define TEST_OK (   rule)
Value:
{ \
DetectEngineCtx *de_ctx = DetectEngineCtxInit(); \
FAIL_IF_NULL(de_ctx); \
Signature *s = DetectEngineAppendSig(de_ctx, (rule)); \
FAIL_IF_NULL(s); \
DetectEngineCtxFree(de_ctx); \
}

Definition at line 97 of file detect-bsize.c.

◆ TEST_OK [2/2]

#define TEST_OK (   str,
  m,
  lo,
  hi 
)
Value:
{ \
DetectBsizeData *bsz = DetectBsizeParse((str)); \
FAIL_IF_NULL(bsz); \
FAIL_IF_NOT(bsz->mode == (m)); \
DetectBsizeFree(NULL, bsz); \
SCLogDebug("str %s OK", (str)); \
}

Definition at line 97 of file detect-bsize.c.

m
SCMutex m
Definition: flow-hash.h:6
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:17
DetectEngineAppendSig
Signature * DetectEngineAppendSig(DetectEngineCtx *de_ctx, const char *sigstr)
Parse and append a Signature into the Detection Engine Context signature list.
Definition: detect-parse.c:2344
str
#define str(s)
Definition: suricata-common.h:273
DetectEngineCtxInit
DetectEngineCtx * DetectEngineCtxInit(void)
Definition: detect-engine.c:2048