]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unittest: fix unneeded includes as per cppclean
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 1 Nov 2022 20:39:50 +0000 (21:39 +0100)
committerVictor Julien <vjulien@oisf.net>
Fri, 18 Nov 2022 07:27:01 +0000 (08:27 +0100)
Especially because there is conditional inclusion from a header

79 files changed:
src/app-layer-modbus.c
src/app-layer-smtp.c
src/decode-icmpv6.c
src/decode-ipv6.c
src/decode-raw.c
src/decode-tcp.c
src/decode-vlan.c
src/decode-vntag.c
src/defrag.c
src/detect-app-layer-event.c
src/detect-bytemath.c
src/detect-content.c
src/detect-csum.c
src/detect-dce-stub-data.c
src/detect-detection-filter.c
src/detect-dns-query.c
src/detect-dsize.c
src/detect-engine-dcepayload.c
src/detect-engine-payload.c
src/detect-engine-port.c
src/detect-engine-state.c
src/detect-fast-pattern.c
src/detect-flow.c
src/detect-flowint.c
src/detect-fragbits.c
src/detect-fragoffset.c
src/detect-ftpbounce.c
src/detect-http-client-body.c
src/detect-icmp-id.c
src/detect-icmp-seq.c
src/detect-icode.c
src/detect-ipproto.c
src/detect-iprep.c
src/detect-l3proto.c
src/detect-lua.c
src/detect-parse.c
src/detect-pcre.c
src/detect-quic-cyu-hash.c
src/detect-quic-cyu-string.c
src/detect-replace.c
src/detect-rpc.c
src/detect-sameip.c
src/detect-ssh-proto-version.c
src/detect-ssh-software-version.c
src/detect-tcp-ack.c
src/detect-template-buffer.c
src/detect-template-rust-buffer.c
src/detect-threshold.c
src/detect-tls-cert-fingerprint.c
src/detect-urilen.c
src/runmode-unittests.c
src/stream-tcp-cache.c
src/tests/detect-http-cookie.c
src/tests/detect-http-header.c
src/tests/detect-http-host.c
src/tests/detect-http-method.c
src/tests/detect-http-raw-header.c
src/tests/detect-http-server-body.c
src/tests/detect-http-stat-code.c
src/tests/detect-http-stat-msg.c
src/tests/detect-http-uri.c
src/tests/detect-http-user-agent.c
src/tests/detect-snmp-community.c
src/tests/detect-tls-cert-issuer.c
src/tests/detect-tls-cert-serial.c
src/tests/detect-tls-cert-subject.c
src/tests/detect-tls-cert-validity.c
src/tests/detect-tls-certs.c
src/tests/detect-ttl.c
src/tests/fuzz/fuzz_predefpcap_aware.c
src/tests/fuzz/fuzz_sigpcap.c
src/tests/fuzz/fuzz_sigpcap_aware.c
src/util-mpm-ac-bs.c
src/util-mpm-ac-ks.c
src/util-mpm-ac.c
src/util-mpm-hs.c
src/util-threshold-config.c
src/util-unittest-helper.c
src/util-unittest-helper.h

index 2534d72bf65722b7376f81177c18f68e783d2dd1..c1edbf2d369871c59e8a7dee2491ab747269af93 100644 (file)
@@ -62,6 +62,7 @@ void RegisterModbusParsers(void)
 #include "detect-engine.h"
 #include "detect-parse.h"
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 
 #include "flow-util.h"
 
index b4230d2cb7b3a31262d396fbc2b0d667394e4de2..45836c5efd274d3c5864be883e8e70191364ebcd 100644 (file)
@@ -1781,6 +1781,7 @@ void SMTPParserCleanup(void)
 /***************************************Unittests******************************/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 static void SMTPTestInitConfig(void)
 {
index 36666c9867f7d1d7eaa37c4c454ca84cd841db69..8f2adc1b0b3669f926929b41f2c821a0a33e475c 100644 (file)
@@ -520,6 +520,7 @@ int DecodeICMPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p,
 }
 
 #ifdef UNITTESTS
+#include "packet.h"
 #include "util-unittest-helper.h"
 
 static int ICMPV6CalculateValidChecksumtest01(void)
index 65fedc22d3fef1b2bc1af8c613f236cfe7dfe96e..72d81c86deb661160011f5c080e9c95f63baa519 100644 (file)
@@ -650,6 +650,7 @@ int DecodeIPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "packet.h"
 
 /**
  * \test fragment decoding
index bb34b4323670512538278ff8e45994b76b02e61d..1a64f1adf903ec82b2311cd882b4e225fdd996fb 100644 (file)
@@ -75,6 +75,7 @@ int DecodeRaw(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p,
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "packet.h"
 
 /** DecodeRawtest01
  *  \brief Valid Raw packet
index 1df718d2ede54d48a38e2f700ebd13119f2fd05f..a94c93d3c202931435b39f8f1ecfc22a026d5f29 100644 (file)
@@ -271,6 +271,7 @@ int DecodeTCP(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p,
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "packet.h"
 
 static int TCPCalculateValidChecksumtest01(void)
 {
index 820b316d9845abbc130767e5eb43e51ee5d4beb3..61059201eb8599e0d44e92532c06f2b44f2785ca 100644 (file)
@@ -135,6 +135,7 @@ int DecodeIEEE8021ah(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p,
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "packet.h"
 
 /** \todo Must GRE+VLAN and Multi-Vlan packets to
  * create more tests
index 0b0eb28f43f96e3b05be809ef8b5358892c08e02..581f2570a31f59ad9b63781455f903bd9d385ad6 100644 (file)
@@ -84,6 +84,7 @@ int DecodeVNTag(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "packet.h"
 
 /**
  * \test DecodeVNTagTest01 test if vntag header is too small.
index d42db1dfc40b9b1edc41c61fd62cef510b324c1c..e541ee40256d3e6fff202bba35a9ba3eda17bd98 100644 (file)
@@ -1088,6 +1088,8 @@ void DefragDestroy(void)
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "packet.h"
+
 #define IP_MF 0x2000
 
 /**
index f189cbfd3cf9486c2f5fa9d3ede34c723b6f936b..49b4cca672571683c0e56cfe05fd80e66b868f50 100644 (file)
@@ -431,6 +431,7 @@ int DetectAppLayerEventPrepare(DetectEngineCtx *de_ctx, Signature *s)
 #include "stream-tcp-private.h"
 #include "stream-tcp-reassemble.h"
 #include "stream-tcp.h"
+#include "detect-engine-alert.h"
 
 #define APP_LAYER_EVENT_TEST_MAP_EVENT1 0
 #define APP_LAYER_EVENT_TEST_MAP_EVENT2 1
index 23071219253734f19913054c20013e678b473670..6baeda3ebc54b1240c58213fe7e81ece32c816fb 100644 (file)
@@ -422,6 +422,7 @@ SigMatch *DetectByteMathRetrieveSMVar(const char *arg, const Signature *s)
 
 /*************************************Unittests********************************/
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 #include "app-layer-parser.h"
 
index de6a31399bc631d55b973f50708fa929e0680fba..4ac802ec783feb4295a2365cd41763a3cfb50436 100644 (file)
@@ -740,6 +740,8 @@ void DetectContentPatternPrettyPrint(const DetectContentData *cd, char *str, siz
 }
 
 #ifdef UNITTESTS /* UNITTESTS */
+#include "detect-engine-alert.h"
+#include "packet.h"
 
 static bool TestLastContent(const Signature *s, uint16_t o, uint16_t d)
 {
index d0071cd2b554b459f58bb24484638e9373224980..825c00d6b449c6fa904be1fb263593ccfe1e2c92 100644 (file)
@@ -899,6 +899,9 @@ static void DetectICMPV6CsumFree(DetectEngineCtx *de_ctx, void *ptr)
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "detect-engine.h"
+#include "detect-engine-alert.h"
+#include "packet.h"
 
 #define mystr(s) #s
 #define TEST1(kwstr) {\
index 411009d320a751154b2138dd4e7f7ea441fde09f..6a4f540885977c992059721cb6ce06406c9de075 100644 (file)
@@ -181,6 +181,7 @@ static int DetectDceStubDataSetup(DetectEngineCtx *de_ctx, Signature *s, const c
 /************************************Unittests*********************************/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 static int DetectDceStubDataTestParse01(void)
 {
index a8b89540d21fdad7961801c77b1c7c56dd9e57dd..3fdb3c79c694b305ffe08b19b59d2bdeaa288987 100644 (file)
@@ -273,8 +273,11 @@ static void DetectDetectionFilterFree(DetectEngineCtx *de_ctx, void *df_ptr)
 #include "detect-engine.h"
 #include "detect-engine-mpm.h"
 #include "detect-engine-threshold.h"
+#include "detect-engine-alert.h"
 #include "util-time.h"
 #include "util-hashlist.h"
+#include "action-globals.h"
+#include "packet.h"
 
 /**
  * \test DetectDetectionFilterTestParse01 is a test for a valid detection_filter options
index 77f1c00f95888d865c0f7c0840fab1740014bdbb..b2e37493cd0482d1485c52f7ad4c03b9bba926c9 100644 (file)
@@ -262,6 +262,7 @@ static int DetectDnsQuerySetup(DetectEngineCtx *de_ctx, Signature *s, const char
 
 #ifdef UNITTESTS
 #include "detect-isdataat.h"
+#include "detect-engine-alert.h"
 
 /** \test simple google.com query matching */
 static int DetectDnsQueryTest01(void)
index c0603c67eea66b550f1e283fdd02d810ca6a10e2..d2eb12fcb7838542d9fad70f1153a4adb572b46b 100644 (file)
@@ -375,6 +375,9 @@ void SigParseApplyDsizeToContent(Signature *s)
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "detect-engine.h"
+#include "detect-engine-alert.h"
+#include "packet.h"
 
 /**
  * \test this is a test for a valid dsize value 1
index 1e865ced25f28948f1f9b1f154701647641e18ad..9bfaecabb26f9d4330ef4de170be5c08c2c7d28f 100644 (file)
@@ -57,6 +57,7 @@ static int g_dce_stub_data_buffer_id = 0;
 /**************************************Unittests*******************************/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 /**
  * \test Test the working of byte_test endianness.
index 2d136a8bfe2f92a324dbe95bfc93d4139813a53a..6adbc7a77581ad4ae822cc3c4f176ff49b4e2a7a 100644 (file)
@@ -373,6 +373,7 @@ uint8_t DetectEngineInspectStream(DetectEngineCtx *de_ctx, DetectEngineThreadCtx
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 /** \test Not the first but the second occurence of "abc" should be used
   *       for the 2nd match */
index 47372d3283eaadea13bf71240a0cbf445a6722b1..4044b8403a485b1fed94dfe492fbc79e13feccd1 100644 (file)
@@ -1498,6 +1498,8 @@ void DetectPortHashFree(DetectEngineCtx *de_ctx)
 /*---------------------- Unittests -------------------------*/
 
 #ifdef UNITTESTS
+#include "packet.h"
+
 /**
  * \brief Do a sorted insert, where the top of the list should be the biggest
  * port range.
index df8beea2863923aee8c728281e4f65b65ae7ddfb..b600180fafa823d32cc8d40801bddf9913dc0e3f 100644 (file)
@@ -295,6 +295,7 @@ void DetectEngineStateResetTxs(Flow *f)
 /*********Unittests*********/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 static int DeStateTest01(void)
 {
index 373682bf0028d7254bc2135e1889bf30b75eba61..a53df30a60f68c630f18f271fcd221b29c33075a 100644 (file)
@@ -365,6 +365,7 @@ static int DetectFastPatternSetup(DetectEngineCtx *de_ctx, Signature *s, const c
 /*----------------------------------Unittests---------------------------------*/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 static int DetectFastPatternStickySingle(const char *sticky, const int list)
 {
     DetectEngineCtx *de_ctx = DetectEngineCtxInit();
index ada5c7c0d5a948e035a5b5a6983cae129ec998a8..6f9e4142761ea4696f423a50ef51196d811f6a01 100644 (file)
@@ -483,6 +483,7 @@ static bool PrefilterFlowIsPrefilterable(const Signature *s)
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectFlowTestParse01 is a test to make sure that we return "something"
index 631fafc1061881f426b0a1d34b0b8c6c158fcd3a..3819747cd15869e7b6f8eeb1017e43068b6f5eab 100644 (file)
@@ -428,6 +428,7 @@ void DetectFlowintFree(DetectEngineCtx *de_ctx, void *tmp)
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 /**
  * \brief This is a helper funtion used for debugging purposes
  */
index 623df8ceba03281e4936a2df96f4aa8f548f96ba..0dbca7a672d1fc60cb8ee3ce7b22605c66ab0aa6 100644 (file)
@@ -386,6 +386,7 @@ static bool PrefilterFragBitsIsPrefilterable(const Signature *s)
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "packet.h"
 
 /**
  * \test FragBitsTestParse01 is a test for a  valid fragbits value
index 794de4099c591a4ca3e792204c62517739e33040..eae71242891eee62ad99764ab2e2bdddaf1a2e56 100644 (file)
@@ -328,6 +328,8 @@ static bool PrefilterFragOffsetIsPrefilterable(const Signature *s)
 
 #ifdef UNITTESTS
 #include "util-unittest-helper.h"
+#include "detect-engine.h"
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectFragOffsetParseTest01 is a test for setting a valid fragoffset value
index ed8cd68d66f6ee9a598aa29cee0bfc1e657f1dff..38f978003c1979b544bc2847a78705f9cc7acf04 100644 (file)
@@ -241,6 +241,7 @@ int DetectFtpbounceSetup(DetectEngineCtx *de_ctx, Signature *s, const char *ftpb
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectFtpbounceTestSetup01 is a test for the Setup ftpbounce
index ec4caacfd5d8821b8a9a7178d14e58c01d4df9e5..9bb08d5cdf83e18607cf8da398152799ba6391f0 100644 (file)
@@ -389,6 +389,7 @@ static int PrefilterMpmHttpRequestBodyRegister(DetectEngineCtx *de_ctx, SigGroup
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 #include "tests/detect-http-client-body.c"
 #endif /* UNITTESTS */
 
index 73cde21ad1ef0db2e322420ff214a325df64084b..613cbccc7fcdb1ea3a6250fd43bdc8ec5aa07c81 100644 (file)
@@ -30,6 +30,7 @@
 #include "detect-parse.h"
 #include "detect-engine-prefilter-common.h"
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 
 #include "detect-icmp-id.h"
 
index 8e120ee0fa0a4e9967285fa4f84f1a74d7fcfba5..87bfda3ebfa65aaffb902f5a586ae05dfe4b7b99 100644 (file)
@@ -327,6 +327,9 @@ static bool PrefilterIcmpSeqIsPrefilterable(const Signature *s)
 }
 
 #ifdef UNITTESTS
+#include "detect-engine.h"
+#include "detect-engine-mpm.h"
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectIcmpSeqParseTest01 is a test for setting a valid icmp_seq value
index 8cc68b52e895e7ba19d07ba647e9bd7ff2635a1a..3a601c286df7054afeb4702de665fea2136c7b54 100644 (file)
@@ -198,6 +198,7 @@ static bool PrefilterICodeIsPrefilterable(const Signature *s)
 #ifdef UNITTESTS
 #include "detect-engine.h"
 #include "detect-engine-mpm.h"
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectICodeParseTest01 is a test for setting a valid icode value
index d96352b5940fff7e37f64b948a37d94e64c4e6f3..656f07daee5ef7633cf515a9301d60888a384752 100644 (file)
@@ -455,6 +455,7 @@ static void DetectIPProtoFree(DetectEngineCtx *de_ctx, void *ptr)
 
 /* UNITTESTS */
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectIPProtoTestParse01 is a test for an invalid proto number
index 59c3d1aec39d3800aa834817d6e1aa36d953fc73..f78c1a3e28cdafc849784a3ee81a4685e7e9d510 100644 (file)
@@ -255,6 +255,9 @@ void DetectIPRepFree (DetectEngineCtx *de_ctx, void *ptr)
 }
 
 #ifdef UNITTESTS
+#include "packet.h"
+#include "action-globals.h"
+
 static FILE *DetectIPRepGenerateCategoriesDummy(void)
 {
     FILE *fd = NULL;
index de869f5a286a70d40fbb8c56ab046b02468977c8..837a55744913ba23e06423cf8fbc1a17af588c03 100644 (file)
@@ -108,6 +108,7 @@ error:
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectL3protoTestSig01 is a test for checking the working of ttl keyword
index b2a6dc51248c5390da2ada23702caadffd77bff9..f3b29a53db044c8d8e6bafd3484e6676f3e08a3b 100644 (file)
@@ -1163,6 +1163,8 @@ static void DetectLuaFree(DetectEngineCtx *de_ctx, void *ptr)
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
+
 /** \test http buffer */
 static int LuaMatchTest01(void)
 {
index 061265cffeda9ac5086d503c4bc388dcc25ebe76..b0c3e5a574770edfb6df051cf2e97a537076667f 100644 (file)
@@ -2619,6 +2619,9 @@ void DetectSetupParseRegexes(const char *parse_str, DetectParseRegex *detect_par
  */
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
+#include "packet.h"
+
 static int SigParseTest01 (void)
 {
     int result = 1;
index 5bc4be0ce47f46992c8f2d066a6cf2129b049cc5..f55ac998a67477ad4cc19de74e3e1ec8ba897b11 100644 (file)
@@ -962,6 +962,7 @@ static void DetectPcreFree(DetectEngineCtx *de_ctx, void *ptr)
 }
 
 #ifdef UNITTESTS /* UNITTESTS */
+#include "detect-engine-alert.h"
 static int g_file_data_buffer_id = 0;
 static int g_http_header_buffer_id = 0;
 static int g_dce_stub_data_buffer_id = 0;
index 40cff70ecd2512376ed2c5fb901b0c81829300e7..33f8aa54098ebdb45130ae614f3ac2e67e243409 100644 (file)
@@ -249,6 +249,7 @@ void DetectQuicCyuHashRegister(void)
 #include "util-unittest.h"
 #include "util-unittest-helper.h"
 #include "flow-util.h"
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectQuicCyuHashTest01 is a test for a valid quic packet, matching
index 914a6432a52bf3993f876989a6d60b27e9264817..9ece51fe9a53e06c1821c5c57393ff77d18e7259 100644 (file)
@@ -205,6 +205,7 @@ void DetectQuicCyuStringRegister(void)
 #include "util-unittest.h"
 #include "util-unittest-helper.h"
 #include "flow-util.h"
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectQuicCyuStringTest01 is a test for a valid quic packet, matching
index b17b0f4b23742545c2c07ffaca581c7d73a8b9e1..cb0cf169f8bc880685cb5a99ee04939747d392bd 100644 (file)
@@ -236,6 +236,8 @@ void DetectReplaceFreeInternal(DetectReplaceList *replist)
 }
 
 #ifdef UNITTESTS /* UNITTESTS */
+#include "detect-engine-alert.h"
+#include "packet.h"
 
 /**
  * \test Test packet Matches
index 0509dfa9cffda0145e70c582ec1bd32a77fd92d2..5394511027cb8733aaba58c5c39e80998bc01921 100644 (file)
@@ -306,6 +306,7 @@ void DetectRpcFree(DetectEngineCtx *de_ctx, void *ptr)
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 /**
  * \test DetectRpcTestParse01 is a test to make sure that we return "something"
  *  when given valid rpc opt
index aed8c74b4c76bcabd3c206134ac5149207b69568..4bf03b0cd888d5a8a50216fd8b22ba10ae6525e9 100644 (file)
@@ -115,6 +115,7 @@ error:
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 /* NOTE: No parameters, so no parse tests */
 
index 76024dd68d7bafb6eb81c240e86031e5b165ce5f..1f15f32fa81484ce4f1e96aae3e1c034e18b27b9 100644 (file)
@@ -272,6 +272,7 @@ void DetectSshVersionFree(DetectEngineCtx *de_ctx, void *ptr)
 }
 
 #ifdef UNITTESTS /* UNITTESTS */
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectSshVersionTestParse01 is a test to make sure that we parse
index 7cbca4f810b5d061b140829a70c12512b702d62f..849c01e0eb60c166662d5fff391fe018abaa29ce 100644 (file)
@@ -261,6 +261,7 @@ static void DetectSshSoftwareVersionFree(DetectEngineCtx *de_ctx, void *ptr)
 }
 
 #ifdef UNITTESTS /* UNITTESTS */
+#include "detect-engine-alert.h"
 
 /**
  * \test DetectSshSoftwareVersionTestParse01 is a test to make sure that we parse
index 9c9f288f4f779182262d51f30a70118a6a859fff..d34911120b5cc1294311587a63fa2f7a54ea8780 100644 (file)
@@ -208,6 +208,7 @@ static bool PrefilterTcpAckIsPrefilterable(const Signature *s)
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 /**
  * \internal
  * \brief This test tests sameip success and failure.
index 419d4783885a0106fe9682b2ef84d06895c73407..777bb28aa514b744225f1717b2651a59f59f6530 100644 (file)
@@ -147,5 +147,6 @@ static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 #include "tests/detect-template-buffer.c"
 #endif
index 24f81f6245c75e7e01c9d34d3238d3f4ee48669f..62823a94e8b2bf792ce243d7c92cd25bfa437325 100644 (file)
@@ -126,6 +126,7 @@ static uint8_t DetectEngineInspectTemplateRustBuffer(DetectEngineCtx *de_ctx,
 #include "detect-parse.h"
 #include "flow-util.h"
 #include "stream-tcp.h"
+#include "detect-engine-alert.h"
 
 static int DetectTemplateRustBufferTest(void)
 {
index 1395a33898a761fe8ae8630aec47dd59e8671b28..7d732e30371255aa79baf1f12c8a5e5599a0bc93 100644 (file)
@@ -340,9 +340,11 @@ error:
 #ifdef UNITTESTS
 #include "detect-engine.h"
 #include "detect-engine-mpm.h"
+#include "detect-engine-alert.h"
 #include "util-time.h"
 #include "util-hashlist.h"
-
+#include "packet.h"
+#include "action-globals.h"
 /**
  * \test ThresholdTestParse01 is a test for a valid threshold options
  *
index ffdef752dfe38571c9f41eb75ef0eb429eed4ffb..d881d9c457322d679584042c381906c328d8bf88 100644 (file)
@@ -226,5 +226,6 @@ static void DetectTlsFingerprintSetupCallback(const DetectEngineCtx *de_ctx,
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 #include "tests/detect-tls-cert-fingerprint.c"
 #endif
index ad4ca72f6bf50d316b33c49ff3f25112c778dfb1..6363c6adbb1c141926404b44bcbf7556b79c51f5 100644 (file)
@@ -238,6 +238,7 @@ bool DetectUrilenValidateContent(const Signature *s, int list, const char **sige
 #include "detect-engine.h"
 #include "detect-engine-mpm.h"
 #include "app-layer-parser.h"
+#include "detect-engine-alert.h"
 
 /** \test   Test the Urilen keyword setup */
 static int DetectUrilenParseTest01(void)
index 5d4655bfec0b73985dad1bb6eff9c5540a7793bc..985f2aefd3eea70d21f10e2295ba4c0a65bb9b52 100644 (file)
@@ -28,6 +28,7 @@
 #ifdef UNITTESTS
 #include "detect-parse.h"
 #include "detect-engine.h"
+#include "detect-engine-alert.h"
 #include "detect-engine-address.h"
 #include "detect-engine-proto.h"
 #include "detect-engine-port.h"
index b74d033758afa46f577c432d7a4e55ed6c1bad45..60b0aa2afe1dc03c60207772deab987a6e9202db 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "suricata-common.h"
+#include "suricata.h"
 #include "stream-tcp-private.h"
 #include "stream-tcp-cache.h"
 
index a85c331372969b4e0df69527d97f2253840f7b0f..5c1d711f1092d253903298d413c337eee7f869bb 100644 (file)
@@ -43,6 +43,7 @@
 #include "../app-layer-protos.h"
 #include "../detect-isdataat.h"
 #include "../detect-engine-build.h"
+#include "../detect-engine-alert.h"
 
 /***********************************Unittests**********************************/
 
index 687eb2b1d8a0c7105ea22cf92809c5e8b71a73e1..0d4116562e1e551a075ece3f6ba7409f423b85a0 100644 (file)
@@ -42,6 +42,7 @@
 #include "../detect-http-header.h"
 #include "../detect-http-header-common.h"
 #include "../detect-engine-build.h"
+#include "../detect-engine-alert.h"
 
 #include "../detect-isdataat.h"
 
index f4365a92f3e150b7e79dd9eee39aa5cfa77511b2..b9585b8ddb5d071d6a81f59d3d671a182eb1bf3d 100644 (file)
@@ -43,6 +43,7 @@
 #include "app-layer-htp.h"
 #include "app-layer-protos.h"
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 
 /**
  * \test Test that the http_host content matches against a http request
index 530a60e5758fc884a1b147385b6ab955526a6709..d834a8f18caca84e080eac9ef3555ce95809138f 100644 (file)
@@ -43,6 +43,7 @@
 #include "../app-layer-protos.h"
 #include "../detect-isdataat.h"
 #include "../detect-engine-build.h"
+#include "../detect-engine-alert.h"
 
 /**
  * \test Test that the http_method content matches against a http request
index cab73ed8a41d53ccaa92f41d1e612c1419fccb69..973a49b056ab51008fcb0c7ccd95a9ad067e2532 100644 (file)
@@ -40,6 +40,7 @@
 #include "../detect-isdataat.h"
 #include "../detect-pcre.h"
 #include "../detect-engine-build.h"
+#include "../detect-engine-alert.h"
 
 #include "../stream-tcp.h"
 #include "../app-layer.h"
index 42f3b5e055b8d0767a903f0e29f5d31adab07353..50e8692a982363833b32c8c4d430ba45b9be07f0 100644 (file)
@@ -29,6 +29,7 @@
 #include "../flow.h"
 #include "../detect.h"
 #include "../detect-engine-build.h"
+#include "../detect-engine-alert.h"
 
 /**
  * \test Test parser accepting valid rules and rejecting invalid rules
index 9f16d9963d4614281ce399d4e420dc4484df7349..2f504fe29c3b618865bdd65a3e3352a0307e0cf7 100644 (file)
@@ -39,6 +39,7 @@
 #include "../app-layer-htp.h"
 #include "../app-layer-protos.h"
 #include "../detect-engine-build.h"
+#include "../detect-engine-alert.h"
 
 static int DetectEngineHttpStatCodeTest01(void)
 {
index e4317181e90a43d72be731cf1a943662a37b455e..eae72f25cf4b793a72f9066c8b2ad0130a4f74bc 100644 (file)
@@ -39,6 +39,7 @@
 #include "../app-layer-htp.h"
 #include "../app-layer-protos.h"
 #include "../detect-engine-build.h"
+#include "../detect-engine-alert.h"
 
 static int DetectEngineHttpStatMsgTest01(void)
  {
index 9bd5b63d57a15b714ef62cf2a06eb1258d887acb..1664142986908378be97491c280551768802ec25 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "../detect-isdataat.h"
 #include "../detect-engine-build.h"
+#include "../detect-engine-alert.h"
 
 /** \test Test a simple uricontent option */
 static int UriTestSig01(void)
index f0c6fcc5df6204b2f0de41194d34b49c374c4b8f..7b0c59f01c60340f206a994d28e31898548e00c4 100644 (file)
@@ -42,6 +42,7 @@
 #include "app-layer-htp.h"
 #include "app-layer-protos.h"
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 
 static int DetectEngineHttpUATest(
         const uint8_t *buf, const uint32_t buf_len, const char *sig, const bool expect)
index 9b978168dd28d1c5778e7a03e33562c992fd9cbd..1eda88385c47167d4317e719203b506f24711993 100644 (file)
@@ -23,6 +23,7 @@
 #include "flow-util.h"
 #include "stream-tcp.h"
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 
 static int DetectSNMPCommunityTest(void)
 {
index f46520d1a9ccf7b4f0b49f7573d97a99486726f3..f11d9ec9cbba00c001307a8f0949be6705ef212b 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "detect-engine-build.h"
 #include "app-layer-parser.h"
+#include "detect-engine-alert.h"
 
 /**
  * \test Test that a signature containing a tls_cert_issuer is correctly parsed
index fbcb9ceb6c066138284993bfa22c33ce22e7ee1a..e12e202f053c2a457c9e2b508a135139a85c1e89 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 #include "app-layer-parser.h"
 
 /**
index 5f7c1f812def2710d5c12f9a52590207550daf0c..6ee69e75713ef13e6bf39b64de5d511cad44b450 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 #include "app-layer-parser.h"
 
 /**
index fa05412553f75ae75cfaa33e55034420682e7c89..5f117b49fa1fdead854c8fbdfd28f0abf1d5da0a 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 #include "app-layer-parser.h"
 
 /**
index dac9c9eadf629e5d0b768371bf03f7a522414c13..69933b46e889ec3e9baebe6166ec5c6106fd5c91 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "detect-engine-build.h"
+#include "detect-engine-alert.h"
 #include "app-layer-parser.h"
 
 /**
index fc9e5a553039bd5269c752e2138bdc33f1e32b5b..74949313c438a626510e9efd497fb85e71913361 100644 (file)
@@ -18,6 +18,9 @@
 
 #include "../util-unittest.h"
 #include "../util-unittest-helper.h"
+#include "detect-engine.h"
+#include "detect-engine-alert.h"
+#include "detect-engine-build.h"
 
 /**
  * \test DetectTtlParseTest01 is a test for setting up an valid ttl value.
index 58ce96cc5cdf6129c820103428dd011a55c10ee2..49b2a5d9ce15687bbfa240dde9d602b5d2ac4094 100644 (file)
@@ -27,6 +27,7 @@
 #include "tm-modules.h"
 #include "tmqh-packetpool.h"
 #include "util-conf.h"
+#include "packet.h"
 
 #include <fuzz_pcap.h>
 
index 2509849aad83dd304e188decdfb44adf634b0745..453487b8a68e18d4969ee785d29c2f17de03d628 100644 (file)
@@ -29,6 +29,7 @@
 #include "tmqh-packetpool.h"
 #include "util-file.h"
 #include "util-conf.h"
+#include "packet.h"
 
 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
 
index 2f58060f18bf410439dad6ecec5cc441cc34fcd9..4518725b8779a8194768ac061387252582ae989e 100644 (file)
@@ -28,6 +28,7 @@
 #include "tm-modules.h"
 #include "tmqh-packetpool.h"
 #include "util-conf.h"
+#include "packet.h"
 
 #include <fuzz_pcap.h>
 
index 8a51c59811d202a863b416c460a46f865bc5c3e5..2011a76896c84458bda03a407db9aacaaa54cc00 100644 (file)
@@ -1405,6 +1405,7 @@ void SCACBSPrintInfo(MpmCtx *mpm_ctx)
 /*************************************Unittests********************************/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 static int SCACBSTest01(void)
 {
index dc699a79c7c553f5840f8afa8e5a901b26799a59..9ce885b922694abc9beb0ef0b781a3a16c34a90a 100644 (file)
@@ -1480,6 +1480,7 @@ void MpmACTileRegister(void)
 /*************************************Unittests********************************/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 static int SCACTileTest01(void)
 {
index 8b9f5107b9e859b1c21cf5eb2759db4d4602f459..36d368b298068dae1d95afce920ac0ad3d2d3345 100644 (file)
@@ -1251,6 +1251,7 @@ void MpmACRegister(void)
 /*************************************Unittests********************************/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 static int SCACTest01(void)
 {
index 2fff553bc7c529d199db8c9e498f1819e19667ba..fb5d4e7cdc1ba8e8a2431792fdc09c353c234eab 100644 (file)
@@ -1094,6 +1094,7 @@ void MpmHSGlobalCleanup(void)
 /*************************************Unittests********************************/
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
 
 static int SCHSTest01(void)
 {
index 9b63e8447d890dac2db2bb14e3c4669e941dd31b..4d8e61aa40aeca116004a3f881f4b2b026de8db0 100644 (file)
@@ -1117,6 +1117,9 @@ int SCThresholdConfParseFile(DetectEngineCtx *de_ctx, FILE *fp)
 }
 
 #ifdef UNITTESTS
+#include "detect-engine-alert.h"
+#include "packet.h"
+#include "action-globals.h"
 
 /**
  * \brief Creates a dummy threshold file, with all valid options, for testing purposes.
index 05e313727706f494f8683a859570415a8e1de351..71e39e7b0ad811c61e99936b0dbc2f0d28fc7ef0 100644 (file)
@@ -35,6 +35,7 @@
 #include "detect.h"
 #include "detect-parse.h"
 #include "detect-engine.h"
+#include "detect-engine-alert.h"
 #include "detect-engine-sigorder.h"
 #include "detect-engine-build.h"
 
index 56f4501c96e66ce3b15b820939ba5601b48cd030..edae52893c82b3ab778aeda315a798002282a599 100644 (file)
 #if defined(UNITTESTS)
 #include "packet.h"
 #include "flow.h"
-#include "stream-tcp.h"
 #include "detect.h"
-#include "detect-engine.h"
-#include "detect-engine-alert.h"
-#include "detect-engine-build.h"
 #elif defined(FUZZ)
-#include "packet.h"
 #include "flow.h"
 #endif