From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 6D619E8C886; Thu, 22 Aug 2024 16:12:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6D619E8C886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1724332378; bh=+A+pSSmZf/Rb+2ZJDIJnWk1toPFHjdd5xCraaYSA9KA=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=yaQylNFwQgFD7LS6syh+jIfbIbq4exTqC84tIJlKIoXqVsvG2ing1jh1eYnzUn6Pu ZPDfXAavszX3Lq2D0M0C62m6POFRT/MCRS97uY/zmnrkY1Qe6ebFrq7iJ+y7MVTlnm qi64+DbEDBw9NmzkuJ8dwolINa/05AZiKaGgTrrc= Received: from fallback22.i.mail.ru (fallback22.i.mail.ru [79.137.243.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6A616E8C8A1 for ; Thu, 22 Aug 2024 16:12:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6A616E8C8A1 Received: from [10.12.4.23] (port=33456 helo=smtp49.i.mail.ru) by fallback22.i.mail.ru with esmtp (envelope-from ) id 1sh6kX-003XSh-7X for tarantool-patches@dev.tarantool.org; Thu, 22 Aug 2024 15:17:09 +0300 Received: by smtp49.i.mail.ru with esmtpa (envelope-from ) id 1sh6iQ-0000000EWLZ-1sav; Thu, 22 Aug 2024 15:14:58 +0300 Content-Type: multipart/alternative; boundary="------------zb7HkZMeRUw1SHCguOd1veeF" Message-ID: <7796fd5b-31a0-4d23-979d-a2feeb508478@tarantool.org> Date: Thu, 22 Aug 2024 15:14:58 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: <364dac6837a1a1a7247c9cb375a6da8771d3c050.1724228998.git.skaplun@tarantool.org> In-Reply-To: <364dac6837a1a1a7247c9cb375a6da8771d3c050.1724228998.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9BB2AFC06FD50F0EFE3B12869E20BC8438FC5F8C20830F730182A05F53808504077C72D7686685CCA03ED270C30F246C59896C190E05687A90BB147A386277BEF94981B86E6AE2D10 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D73594321916E098C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE7C4470ABEE4BC4B50EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B043BF0FB74779F36F0FA15B69E63148A23A4234B538F242BD3ABA492CAE87415A471835C12D1D9774AD6D5ED66289B5259CC434672EE6371117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE77A825AB47F0FC8649FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE7D36F53DD076E3CB7D32BA5DBAC0009BE395957E7521B51C2330BD67F2E7D9AF1090A508E0FED6299176DF2183F8FC7C0E3E3FB6EC827F0A0CD04E86FAF290E2DB606B96278B59C421DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B602CFACCC19C6E7D3089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5A9A13C9C3EB4202A5002B1117B3ED69697832325910148F8CA7E60A991436CA2823CB91A9FED034534781492E4B8EEAD47A3109F1ACFD409BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF25D6AF1AA7D0EEDFED785D8F53A620CD03C1F9AC2799F040E6A1A1468C66C1C8A08A323FE4E4FE842FB0CAD32ADFBF840A77BC9EB427B873033BADB62CCF475956F330F1E3C678295F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbUwDRTee1XoCHAvIoxa3Uw== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D614094F1D9559F382E6856F28C8FC70D08471CF97BB92F5414AB0152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok X-7564579A: 646B95376F6C166E X-77F55803: 6242723A09DB00B4A060E3D0EC9C207DC9396BBF5FFFF6141F994DA0E1D949D6049FFFDB7839CE9E8C88765FAFC03EAD6B30A47259CA0A9E1C4CE34512D4748E68715E5EA55DCBAF X-7FA49CB5: 0D63561A33F958A5BDB1CE5368223098E36BC194FD350713415379F17B2CF6F78941B15DA834481FA18204E546F3947CCF7CD7A0D5AA5F25F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F790063796D31E89718C7775389733CBF5DBD5E9B5C8C57E37DE458BD96E472CDF7238E0725E5C173C3A84C37727919777A35F2B35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbUwDRTee1XqOyeTwWOisPQ== X-Mailru-MI: 8000000000000800 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 15/45] test: enable LuaJIT test X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------zb7HkZMeRUw1SHCguOd1veeF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sergey, On 21.08.2024 11:58, Sergey Kaplun wrote: > This patch moves the aforementioned test from the to the > directory (with slightly renaming to be consistent with other names), > includes it in , and names the subtests. > > Part of tarantool/tarantool#9398 > --- thanks for the patch! Please adjust a width of lines in commit message. LGTM > test/LuaJIT-tests/lang/gc_step.lua | 39 ++++++++++++++++++++++++++++++ > test/LuaJIT-tests/lang/index | 1 + > test/LuaJIT-tests/misc/gcstep.lua | 33 ------------------------- > 3 files changed, 40 insertions(+), 33 deletions(-) > create mode 100644 test/LuaJIT-tests/lang/gc_step.lua > delete mode 100644 test/LuaJIT-tests/misc/gcstep.lua > > diff --git a/test/LuaJIT-tests/lang/gc_step.lua b/test/LuaJIT-tests/lang/gc_step.lua > new file mode 100644 > index 00000000..756d7a61 > --- /dev/null > +++ b/test/LuaJIT-tests/lang/gc_step.lua > @@ -0,0 +1,39 @@ > +local function testgc(what, func) > + collectgarbage() > + local oc = gcinfo() > + func() > + local nc = gcinfo() > + assert(nc < oc * 4, "GC step missing for " .. what) > +end > + > +do --- TNEW > + testgc("TNEW", function() > + for _ = 1, 10000 do > + local _ = {} > + end > + end) > +end > + > +do --- TDUP > + testgc("TDUP", function() > + for _ = 1, 10000 do > + local _ = {1} > + end > + end) > +end > + > +do --- FNEW > + testgc("FNEW", function() > + for _ = 1, 10000 do > + local function _() end > + end > + end) > +end > + > +do --- CAT > + testgc("CAT", function() > + for i = 1, 10000 do > + local _ = "x" .. i > + end > + end) > +end > diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index > index b0e7f073..274425bf 100644 > --- a/test/LuaJIT-tests/lang/index > +++ b/test/LuaJIT-tests/lang/index > @@ -19,5 +19,6 @@ tail_recursion.lua > vararg_jit.lua > gc.lua > gc_debug.lua > +gc_step.lua > goto.lua +goto > meta > diff --git a/test/LuaJIT-tests/misc/gcstep.lua b/test/LuaJIT-tests/misc/gcstep.lua > deleted file mode 100644 > index 533356b7..00000000 > --- a/test/LuaJIT-tests/misc/gcstep.lua > +++ /dev/null > @@ -1,33 +0,0 @@ > - > -local function testgc(what, func) > - collectgarbage() > - local oc = gcinfo() > - func() > - local nc = gcinfo() > - assert(nc < oc*4, "GC step missing for "..what) > -end > - > -testgc("TNEW", function() > - for i=1,10000 do > - local t = {} > - end > -end) > - > -testgc("TDUP", function() > - for i=1,10000 do > - local t = {1} > - end > -end) > - > -testgc("FNEW", function() > - for i=1,10000 do > - local function f() end > - end > -end) > - > -testgc("CAT", function() > - for i=1,10000 do > - local s = "x"..i > - end > -end) > - --------------zb7HkZMeRUw1SHCguOd1veeF Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Sergey,

On 21.08.2024 11:58, Sergey Kaplun wrote:
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
---

thanks for the patch! Please adjust a width of lines in commit message.

LGTM

 test/LuaJIT-tests/lang/gc_step.lua | 39 ++++++++++++++++++++++++++++++
 test/LuaJIT-tests/lang/index       |  1 +
 test/LuaJIT-tests/misc/gcstep.lua  | 33 -------------------------
 3 files changed, 40 insertions(+), 33 deletions(-)
 create mode 100644 test/LuaJIT-tests/lang/gc_step.lua
 delete mode 100644 test/LuaJIT-tests/misc/gcstep.lua

diff --git a/test/LuaJIT-tests/lang/gc_step.lua b/test/LuaJIT-tests/lang/gc_step.lua
new file mode 100644
index 00000000..756d7a61
--- /dev/null
+++ b/test/LuaJIT-tests/lang/gc_step.lua
@@ -0,0 +1,39 @@
+local function testgc(what, func)
+  collectgarbage()
+  local oc = gcinfo()
+  func()
+  local nc = gcinfo()
+  assert(nc < oc * 4, "GC step missing for " .. what)
+end
+
+do --- TNEW
+  testgc("TNEW", function()
+    for _ = 1, 10000 do
+      local _ = {}
+    end
+  end)
+end
+
+do --- TDUP
+  testgc("TDUP", function()
+    for _ = 1, 10000 do
+      local _ = {1}
+    end
+  end)
+end
+
+do --- FNEW
+  testgc("FNEW", function()
+    for _ = 1, 10000 do
+      local function _() end
+    end
+  end)
+end
+
+do --- CAT
+  testgc("CAT", function()
+    for i = 1, 10000 do
+      local _ = "x" .. i
+    end
+  end)
+end
diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index
index b0e7f073..274425bf 100644
--- a/test/LuaJIT-tests/lang/index
+++ b/test/LuaJIT-tests/lang/index
@@ -19,5 +19,6 @@ tail_recursion.lua
 vararg_jit.lua
 gc.lua
 gc_debug.lua
+gc_step.lua
 goto.lua +goto
 meta
diff --git a/test/LuaJIT-tests/misc/gcstep.lua b/test/LuaJIT-tests/misc/gcstep.lua
deleted file mode 100644
index 533356b7..00000000
--- a/test/LuaJIT-tests/misc/gcstep.lua
+++ /dev/null
@@ -1,33 +0,0 @@
-
-local function testgc(what, func)
-  collectgarbage()
-  local oc = gcinfo()
-  func()
-  local nc = gcinfo()
-  assert(nc < oc*4, "GC step missing for "..what)
-end
-
-testgc("TNEW", function()
-  for i=1,10000 do
-    local t = {}
-  end
-end)
-
-testgc("TDUP", function()
-  for i=1,10000 do
-    local t = {1}
-  end
-end)
-
-testgc("FNEW", function()
-  for i=1,10000 do
-    local function f() end
-  end
-end)
-
-testgc("CAT", function()
-  for i=1,10000 do
-    local s = "x"..i
-  end
-end)
-
--------------zb7HkZMeRUw1SHCguOd1veeF--