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); \
SCLogNotice("rule: %s", rule); \
Signature *s = DetectEngineAppendSig(de_ctx, (rule)); \
FAIL_IF_NOT_NULL(s); \
DetectEngineCtxFree(de_ctx); \
}

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

◆ TEST_FAIL [2/2]

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

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

◆ TEST_OK [1/2]

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

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

◆ TEST_OK [2/2]

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

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

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