]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
disable cpputest leak checks with hyperscan unit tests to avoid crashes or hangs...
authorRuss Combs <rucombs@cisco.com>
Wed, 14 Sep 2016 21:27:40 +0000 (17:27 -0400)
committerRuss Combs <rucombs@cisco.com>
Wed, 14 Sep 2016 21:27:40 +0000 (17:27 -0400)
src/ips_options/test/ips_regex_test.cc
src/search_engines/test/hyperscan_test.cc

index d72b848ee65c3feecf4b3b0c6e4e98484175c34f..0fc3256b74c48ad7e50997b4520b782fa38ff7d6 100644 (file)
@@ -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();
     }
 };
 
index 1f14bac0d5ad72aa570b4b0047fb8a8e1f81d071..4fc30369c5c1fea358d83ed08af1ac17b432bbd2 100644 (file)
@@ -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();
     }
 };