[Tarantool-patches] [PATCH v2 luajit 31/45] test: refactor <lang/gc_stack.lua> LuaJIT test

Sergey Kaplun skaplun at tarantool.org
Mon Aug 26 09:56:34 MSK 2024


Hi, Sergey!
Thanks for the review!
Fixed your comments and force-pushed the branch.

On 22.08.24, Sergey Bronnikov wrote:
> Sergey,
> 
> 
> On 21.08.2024 11:58, Sergey Kaplun wrote:
> > This patch refactors the aforementioned test to make its code style
> > closer to ours.
> >
> > Relates to tarantool/tarantool#9398
> > ---
> 
> thanks for the patch! LGTM with a minor:
> 
> probably line 10 needs more whitespaces:
> 
>  >      do local a,b,c,d,e,f,g,h,i,j,k,l,m,n end -- Ensure bigger frame 
> size.

Fixed thanks!
See the iterative patch below.

===================================================================
diff --git a/test/LuaJIT-tests/lang/gc_stack.lua b/test/LuaJIT-tests/lang/gc_stack.lua
index 8aee57e3..d05d4402 100644
--- a/test/LuaJIT-tests/lang/gc_stack.lua
+++ b/test/LuaJIT-tests/lang/gc_stack.lua
@@ -7,7 +7,10 @@ do --- Marking sparse stack.
     else
       return t[k] -- Leaves holes in each frame.
     end
-    do local a,b,c,d,e,f,g,h,i,j,k,l,m,n end -- Ensure bigger frame size.
+    do
+      -- Ensure bigger frame size.
+      local a, b, c, d, e, f, g, h, i, j, k, l, m, n
+    end
   end})
   local x = t[50]
 end
===================================================================

> 
> >   test/LuaJIT-tests/lang/gc_stack.lua | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/test/LuaJIT-tests/lang/gc_stack.lua b/test/LuaJIT-tests/lang/gc_stack.lua
> > index cd3d8f90..8aee57e3 100644
> > --- a/test/LuaJIT-tests/lang/gc_stack.lua
> > +++ b/test/LuaJIT-tests/lang/gc_stack.lua
> > @@ -1,5 +1,5 @@
> >   do --- Marking sparse stack.
> > -  local t = setmetatable({}, { __index=function(t, k)
> > +  local t = setmetatable({}, { __index = function(t, k)
> >       k = k - 1
> >       if k == 0 then
> >         collectgarbage() -- Mark stack, including holes.

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list