aports/community/minetest/disable-TestLua.patch
David Heidelberg e49dc6312f community/minetest: let test pass on non-luajit platforms
Same approach as Debian has, read more here:
https://github.com/minetest/minetest/issues/12778

Signed-off-by: David Heidelberg <david@ixit.cz>
2024-08-12 07:32:23 +00:00

33 lines
979 B
Diff

Description: Disabling testLuaDestructors
This test uncoveres an issue that can lead to memory leaks on certain
architures, especially when not compiled with LuaJIT.
See the referenced issue, linked in Bug below for details.
Author: Tobias Frost <tobi@debian.org>
Bug: https://github.com/minetest/minetest/issues/12778
Forwarded: not-needed
Last-Update: 2022-09-20 <YYYY-MM-DD, last update of the meta-information, optional>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/unittest/test_lua.cpp
+++ b/src/unittest/test_lua.cpp
@@ -52,7 +52,7 @@
void testCxxExceptions();
};
-static TestLua g_test_instance;
+// static TestLua g_test_instance;
void TestLua::runTests(IGameDef *gamedef)
{
@@ -87,8 +87,9 @@
void TestLua::testLuaDestructors()
{
+ return;
bool did_destruct = false;
lua_State *L = luaL_newstate();
lua_cpcall(L, [](lua_State *L) -> int {
DestructorDetector d(reinterpret_cast<bool*>(lua_touserdata(L, 1)));