[Tarantool-patches] [PATCH luajit 25/36] test: enable <misc/stack_gc.lua> LuaJIT test

Sergey Kaplun skaplun at tarantool.org
Wed Aug 14 16:56:07 MSK 2024


This patch moves the aforementioned test from the <misc> to the <lang/>
directory (with slightly renaming to be consistent with other names),
includes it in <index>, and names the subtests.

Part of tarantool/tarantool#9398
---
 test/LuaJIT-tests/{misc/stack_gc.lua => lang/gc_stack.lua} | 6 ++----
 test/LuaJIT-tests/lang/index                               | 1 +
 2 files changed, 3 insertions(+), 4 deletions(-)
 rename test/LuaJIT-tests/{misc/stack_gc.lua => lang/gc_stack.lua} (76%)

diff --git a/test/LuaJIT-tests/misc/stack_gc.lua b/test/LuaJIT-tests/lang/gc_stack.lua
similarity index 76%
rename from test/LuaJIT-tests/misc/stack_gc.lua
rename to test/LuaJIT-tests/lang/gc_stack.lua
index 656a06a0..8aee57e3 100644
--- a/test/LuaJIT-tests/misc/stack_gc.lua
+++ b/test/LuaJIT-tests/lang/gc_stack.lua
@@ -1,6 +1,5 @@
-
-do
-  local t = setmetatable({}, { __index=function(t, k)
+do --- Marking sparse stack.
+  local t = setmetatable({}, { __index = function(t, k)
     k = k - 1
     if k == 0 then
       collectgarbage() -- Mark stack, including holes.
@@ -12,4 +11,3 @@ do
   end})
   local x = t[50]
 end
-
diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index
index 5c9e7ea4..b262c555 100644
--- a/test/LuaJIT-tests/lang/index
+++ b/test/LuaJIT-tests/lang/index
@@ -26,6 +26,7 @@ tail_recursion.lua
 vararg_jit.lua
 gc.lua
 gc_debug.lua
+gc_stack.lua
 gc_step.lua
 goto.lua +goto
 meta
-- 
2.45.2



More information about the Tarantool-patches mailing list