]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2932 in SNORT/snort3 from ~SBAIGAL/snort3:fix_test_cppchk to...
authorSteve Chew (stechew) <stechew@cisco.com>
Tue, 8 Jun 2021 22:07:23 +0000 (22:07 +0000)
committerSteve Chew (stechew) <stechew@cisco.com>
Tue, 8 Jun 2021 22:07:23 +0000 (22:07 +0000)
Squashed commit of the following:

commit 60df4227963eea528ca74439b4a98d074f82457d
Author: Steven Baigal (sbaigal) <sbaigal@cisco.com>
Date:   Tue Jun 8 09:58:12 2021 -0400

    host_cache: remove unused lua mock code from the tests

src/host_tracker/test/CMakeLists.txt
src/host_tracker/test/host_cache_module_test.cc
src/network_inspectors/rna/test/CMakeLists.txt
src/network_inspectors/rna/test/rna_module_mock.h

index 5e1279733b01f70e786b495a2f57710804ec2ff6..c743a6aa49569f973e2ec9745c1d8d6eb7806f72 100644 (file)
@@ -20,6 +20,7 @@ add_cpputest( host_cache_module_test
         $<TARGET_OBJECTS:catch_tests>
     LIBS
         ${CMAKE_THREAD_LIBS_INIT}
+        ${LUAJIT_LIBRARIES}
 )
 
 add_cpputest( host_tracker_test
index aad99bc732b60a1f6f8418492587563c2009a931..1ca95e28978a7a9f889e505d2de8133b04f1eb69 100644 (file)
@@ -75,14 +75,6 @@ bool Snort::is_reloading() { return false; }
 void SnortConfig::register_reload_resource_tuner(ReloadResourceTuner* rrt) { delete rrt; }
 } // end of namespace snort
 
-extern "C"
-{
-typedef ptrdiff_t lua_Integer;
-
-const char* luaL_optlstring(lua_State*, int, const char*, size_t*) { return nullptr; }
-lua_Integer luaL_optinteger(lua_State*, int, lua_Integer) { return 0; }
-}
-
 void show_stats(PegCount*, const PegInfo*, unsigned, const char*) { }
 void show_stats(PegCount*, const PegInfo*, const IndexVec&, const char*, FILE*) { }
 
index 080de0cc034353be50c1f969262d5da482c285ab..0be3be0edd077c8ca4e471b0b6cc9618bc35610a 100644 (file)
@@ -6,4 +6,5 @@ add_cpputest( rna_module_test
         $<TARGET_OBJECTS:catch_tests>
     LIBS
         ${DNET_LIBRARIES}
+        ${LUAJIT_LIBRARIES}
 )
index a58c787b6d844ec2a15150eb3d83effbd36ccf0d..042928ec7e6d555f4b45abc60c303e7c0e8fb43b 100644 (file)
 THREAD_LOCAL RnaStats rna_stats;
 THREAD_LOCAL ProfileStats rna_perf_stats;
 
-const char* luaL_optlstring(lua_State*, int, const char*, size_t*) { return nullptr; }
-
-extern "C"
-{
-    lua_Number luaL_optnumber(lua_State*, int, lua_Number) { return 0; }
-}
-
 namespace snort
 {
 Module* ModuleManager::get_module(const char*)