From: Russ Combs Date: Wed, 14 Sep 2016 21:27:40 +0000 (-0400) Subject: disable cpputest leak checks with hyperscan unit tests to avoid crashes or hangs... X-Git-Tag: 3.0.0-233~263^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d32aa2cdb5c013206eed0e7442f38f8381ea67a1;p=thirdparty%2Fsnort3.git disable cpputest leak checks with hyperscan unit tests to avoid crashes or hangs in cpputest --- diff --git a/src/ips_options/test/ips_regex_test.cc b/src/ips_options/test/ips_regex_test.cc index d72b848ee..0fc3256b7 100644 --- a/src/ips_options/test/ips_regex_test.cc +++ b/src/ips_options/test/ips_regex_test.cc @@ -259,6 +259,8 @@ TEST_GROUP(ips_regex_option) void setup() { + // FIXIT-L cpputest hangs or crashes in the leak detector + MemoryLeakWarningPlugin::turnOffNewDeleteOverloads(); opt = get_option(" foo "); regex_setup(snort_conf); } @@ -268,6 +270,7 @@ TEST_GROUP(ips_regex_option) api->dtor(opt); regex_cleanup(snort_conf); api->pterm(snort_conf); + MemoryLeakWarningPlugin::turnOnNewDeleteOverloads(); } }; @@ -330,6 +333,8 @@ TEST_GROUP(ips_regex_option_relative) void setup() { + // FIXIT-L cpputest hangs or crashes in the leak detector + MemoryLeakWarningPlugin::turnOffNewDeleteOverloads(); opt = get_option("\\bfoo", true); regex_setup(snort_conf); } @@ -338,6 +343,7 @@ TEST_GROUP(ips_regex_option_relative) IpsApi* api = (IpsApi*)ips_regex; api->dtor(opt); regex_cleanup(snort_conf); + MemoryLeakWarningPlugin::turnOnNewDeleteOverloads(); } }; diff --git a/src/search_engines/test/hyperscan_test.cc b/src/search_engines/test/hyperscan_test.cc index 1f14bac0d..4fc30369c 100644 --- a/src/search_engines/test/hyperscan_test.cc +++ b/src/search_engines/test/hyperscan_test.cc @@ -180,6 +180,8 @@ TEST_GROUP(mpse_hs_match) void setup() { + // FIXIT-L cpputest hangs or crashes in the leak detector + MemoryLeakWarningPlugin::turnOffNewDeleteOverloads(); CHECK(se_hyperscan); hs = mpse_api->ctor(snort_conf, nullptr, false, &s_agent); CHECK(hs); @@ -190,6 +192,7 @@ TEST_GROUP(mpse_hs_match) { mpse_api->dtor(hs); hyperscan_cleanup(snort_conf); + MemoryLeakWarningPlugin::turnOnNewDeleteOverloads(); } }; @@ -304,6 +307,8 @@ TEST_GROUP(mpse_hs_multi) void setup() { + // FIXIT-L cpputest hangs or crashes in the leak detector + MemoryLeakWarningPlugin::turnOffNewDeleteOverloads(); CHECK(se_hyperscan); hs1 = mpse_api->ctor(snort_conf, nullptr, false, &s_agent); @@ -320,6 +325,7 @@ TEST_GROUP(mpse_hs_multi) mpse_api->dtor(hs1); mpse_api->dtor(hs2); hyperscan_cleanup(snort_conf); + MemoryLeakWarningPlugin::turnOnNewDeleteOverloads(); } };