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 58972C6C767; Thu, 15 Aug 2024 16:34:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 58972C6C767 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1723728846; bh=4FytpXHNl1fsSP1EgSHd7CNO+F4nwdQq+GRnzmsCaTw=; 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=UdUDsZ6kdLLI1Z0pahqgar/7pDuYGKnkZYO5M4QvnTyhbXg2H/6wHfAbtbNR/Ekd6 vFHFsud5rN1DmzHd6jKyisRHKi51G1ScfCtfxcrqSYBvVbV83NI/1bct4f7ruzRcEu m3aJrPr26xRL2Enk+ijbhmkr/aBdRRyoU2wCva0s= Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [95.163.41.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B133AC6C767 for ; Thu, 15 Aug 2024 16:34:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B133AC6C767 Received: by smtp51.i.mail.ru with esmtpa (envelope-from ) id 1seac6-0000000Bfnn-0pM2; Thu, 15 Aug 2024 16:34:02 +0300 Content-Type: multipart/alternative; boundary="------------oUaHwDd5fIFy5nypuF3bBbAo" Message-ID: <17b6f620-74bd-4247-8b10-6a81ddb6943b@tarantool.org> Date: Thu, 15 Aug 2024 16:34:01 +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: <0e0515a6a5ac5984b8c281c1b01623d58f03ce3b.1723638851.git.skaplun@tarantool.org> In-Reply-To: <0e0515a6a5ac5984b8c281c1b01623d58f03ce3b.1723638851.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F97E3C14763C38E2BBF9CA7D996DF4D34586AA6CD34E3638182A05F538085040361CE1718C29643233594132A326AF8B7AE964DC5C83C9747B0786321B2BD618F8A48EF99929F69E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C8DD139BC0BB8586EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063781C5E355D70FD85B8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D89584514BAFA3098E184D4326A940461321F04FE3C14ECBDDCC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637CAEE156C82D3D7D9389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F7900637F609FDC7BF3E55A5D81D268191BDAD3DBD4B6F7A4D31EC0BE2F48590F00D11D6D81D268191BDAD3D78DA827A17800CE7D36F53DD076E3CB7EC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3C8F21CEC4765490D35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5265B50C21BBBA1235002B1117B3ED6966F982CF794866FFEE99897350C7C491E823CB91A9FED034534781492E4B8EEADA91A6E18C88C5E2F X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF8FDC6F71A34AFD99EDC43093C5EC5C2F4A89F529D6E2BF4F82FA47FA952A0AD612B9ACBE231CC78A470327EB0AC8E693F201C1977AAAA15105302F217ACBFE96869980932F8089605F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojD5rM0r3KxnGm2yXFXrAikg== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D614073554C81C7C49530A7C019533E6F4D8585E5C1FF7FB5955C0152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 11/36] 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. --------------oUaHwDd5fIFy5nypuF3bBbAo Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey thanks for the patch On 14.08.2024 16:55, 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. please describe a reason of moving and say in commit message that patch also added comments and changed formatting. > > Part of tarantool/tarantool#9398 > --- > 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) > - --------------oUaHwDd5fIFy5nypuF3bBbAo Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

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/>
directory (with slightly renaming to be consistent with other names),
includes it in <index>, and names the subtests.

please describe a reason of moving and say in commit message

that patch also added comments and changed formatting.


Part of tarantool/tarantool#9398
---
 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)
-
--------------oUaHwDd5fIFy5nypuF3bBbAo--