Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>,
	Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 05/36] test: enable <misc/debug_gc.lua> LuaJIT test
Date: Thu, 15 Aug 2024 16:09:55 +0300	[thread overview]
Message-ID: <e44d124b-21de-412e-ad1f-65bdc91dea1e@tarantool.org> (raw)
In-Reply-To: <5913e9693652ea13ca55be9de17697144df81749.1723638851.git.skaplun@tarantool.org>

[-- Attachment #1: Type: text/plain, Size: 3151 bytes --]

Hi, Sergey!

thanks for the patch!

On 14.08.2024 16:55, Sergey Kaplun wrote:
> This patch moves the aforementioned test from the <misc> to the <lang/>
It is not clear why do you move it to another suite/dir.
> directory (with slightly renaming to be consistent with other names),
> includes it in <index>, and names the subtest.
>
> Also, it changes the number of iterations to trigger the GC since the
> number of objects is different when running the test as a part of the
> LuaJIT test suite.

the patch contains minor changes related to formatting.

please describe it in commit message.


> Part of tarantool/tarantool#9398
> ---
>   .../{misc/debug_gc.lua => lang/gc_debug.lua}  | 31 ++++++++++++-------
>   test/LuaJIT-tests/lang/index                  |  1 +
>   2 files changed, 20 insertions(+), 12 deletions(-)
>   rename test/LuaJIT-tests/{misc/debug_gc.lua => lang/gc_debug.lua} (63%)
>
> diff --git a/test/LuaJIT-tests/misc/debug_gc.lua b/test/LuaJIT-tests/lang/gc_debug.lua
> similarity index 63%
> rename from test/LuaJIT-tests/misc/debug_gc.lua
> rename to test/LuaJIT-tests/lang/gc_debug.lua
> index 30fb2b99..bb30adc1 100644
> --- a/test/LuaJIT-tests/misc/debug_gc.lua
> +++ b/test/LuaJIT-tests/lang/gc_debug.lua
> @@ -1,12 +1,7 @@
> -
> --- Do not run this test unless the JIT compiler is turned off.
> -if jit and jit.status and jit.status() then return end
> -
>   local caught, caught_line, caught_mm
>   
>   local function gcmeta()
>     if caught ~= "end" then
> ---    print(debug.traceback())
>       -- This may point to the wrong instruction if in a JIT trace.
>       -- But there's no guarantee if, when or where any GC steps occur.
>       local dbg = debug.getinfo(2)
> @@ -22,7 +17,7 @@ local function testgc(mm, f)
>     local u = newproxy(true)
>     getmetatable(u).__gc = gcmeta
>     u = nil
> -  for i=1,100000 do
> +  for i = 1, 1e7 do
>       f(i)
>       -- This check may be hoisted. __gc is not supposed to have side-effects.
>       if caught then break end
> @@ -38,10 +33,22 @@ local function testgc(mm, f)
>     end
>   end
>   
> -local x
> -testgc("__gc", function(i) x = {} end)
> -testgc("__gc", function(i) x = {1} end)
> -testgc("__gc", function(i) x = function() end end)
> -testgc("__concat", function(i) x = i.."" end)
> +do --- Test __gc metamethod info
> +  -- Do not run this test unless the JIT compiler is turned off.
> +  local jit_need_restore = false
> +  if jit and jit.status and jit.status() then
> +    jit_need_restore = true
> +    jit.off()
> +  end
> +
> +  local x
> +  testgc("__gc", function(i) x = {} end)
> +  testgc("__gc", function(i) x = {1} end)
> +  testgc("__gc", function(i) x = function() end end)
> +  testgc("__concat", function(i) x = i.."" end)
>   
> -caught = "end"
> +  caught = "end"
> +  if jit_need_restore then
> +     jit.on()
> +  end
> +end
> diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index
> index 803f32d8..4d9feafd 100644
> --- a/test/LuaJIT-tests/lang/index
> +++ b/test/LuaJIT-tests/lang/index
> @@ -17,5 +17,6 @@ upvalue
>   tail_recursion.lua
>   vararg_jit.lua
>   gc.lua
> +gc_debug.lua
>   goto.lua +goto
>   meta

[-- Attachment #2: Type: text/html, Size: 3905 bytes --]

  reply	other threads:[~2024-08-15 13:09 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14 13:55 [Tarantool-patches] [PATCH luajit 00/36] Rearrange LuaJIT misc tests Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 01/36] test: don't run JIT-based LuaJIT tests without JIT Sergey Kaplun via Tarantool-patches
2024-08-15 12:47   ` Sergey Bronnikov via Tarantool-patches
2024-08-19  8:47     ` Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 02/36] test: enable <misc/alias_alloc.lua> LuaJIT test Sergey Kaplun via Tarantool-patches
2024-08-15 12:51   ` Sergey Bronnikov via Tarantool-patches
2024-08-15 13:31     ` Sergey Kaplun via Tarantool-patches
2024-08-30  7:25       ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 03/36] test: refactor <lang/coroutine.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:00   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 04/36] test: remove <misc/coro_yield.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:05   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 05/36] test: enable <misc/debug_gc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:09   ` Sergey Bronnikov via Tarantool-patches [this message]
2024-08-15 13:25     ` Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 06/36] test: enable <misc/dualnum.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:11   ` Sergey Bronnikov via Tarantool-patches
2024-08-15 13:19     ` Sergey Bronnikov via Tarantool-patches
2024-08-15 13:22       ` Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 07/36] test: remove <misc/fori_coerce.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:20   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 08/36] test: remove <misc/fori_dir.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:21   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 09/36] test: remove <misc/gc_rechain.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:22   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 10/36] test: enable <misc/gc_trace.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:24   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 11/36] test: enable <misc/gcstep.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:34   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 12/36] test: enable <misc/hook_active.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:38   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 13/36] test: enable <misc/hook_line.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:42   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 14/36] test: enable <misc/hook_norecord.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:56   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 15/36] test: enable <misc/hook_record.lua> " Sergey Kaplun via Tarantool-patches
2024-08-15 13:57   ` Sergey Bronnikov via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 16/36] test: enable <misc/hook_top.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:55 ` [Tarantool-patches] [PATCH luajit 17/36] test: enable <misc/jit_flush.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 18/36] test: remove <misc/loop_unroll.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 19/36] test: enable <misc/parse_comp.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 20/36] test: enable <misc/parse_esc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 21/36] test: enable <misc/parse_misc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 22/36] test: enable <misc/phi_conv.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 23/36] test: enable <misc/recurse_deep.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 24/36] test: remove <misc/recurse_tail.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 25/36] test: enable <misc/stack_gc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 26/36] test: enable <misc/stack_purge.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 27/36] test: enable <misc/stackov.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 28/36] test: enable <misc/stackovc.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 29/36] test: enable <misc/tcall_base.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 30/36] test: enable <misc/tcall_loop.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 31/36] test: enable <misc/tonumber_scan.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 32/36] test: remove <misc/uclo.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 33/36] test: enable <misc/unordered_jit.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 34/36] test: enable <misc/wbarrier.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 35/36] test: enable <misc/wbarrier_jit.lua> " Sergey Kaplun via Tarantool-patches
2024-08-14 13:56 ` [Tarantool-patches] [PATCH luajit 36/36] test: enable <misc/wbarrier_obar.lua> " Sergey Kaplun via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e44d124b-21de-412e-ad1f-65bdc91dea1e@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 05/36] test: enable <misc/debug_gc.lua> LuaJIT test' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox