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 2AD21E05ED1; Thu, 5 Dec 2024 10:29:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2AD21E05ED1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1733383766; bh=pPxjRo9zuNzp0ZgLUmWIRIYH91JhTxSHF6rUN1XWmvY=; 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=YIKZjf7uZWCBESgAfPswRNtajyE8LSZtImO6M3NVko3m51LR6mvgwuwZa0XJo4F/I VcJ4DGlrEDXMK7E2GLHz4n5GhZxRTvgxSvsezXDc0JohK5vKMcTQtIxfgBOqQe9jG9 E+6H1O16miNgGAr6xObJQyY4II0zde0KyP1uij7k= Received: from send128.i.mail.ru (send128.i.mail.ru [89.221.237.223]) (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 35A48773601 for ; Thu, 5 Dec 2024 10:29:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 35A48773601 Received: by exim-smtp-5dbb8c54cf-56k72 with esmtpa (envelope-from ) id 1tJ6Ic-00000000Gud-00qV; Thu, 05 Dec 2024 10:29:22 +0300 Content-Type: multipart/alternative; boundary="------------gX4wsVb7cxwI3pvzHqWcyU5G" Message-ID: <18d39736-e607-484c-9577-0e96c9028462@tarantool.org> Date: Thu, 5 Dec 2024 10:29:21 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: <20241203112241.6713-1-skaplun@tarantool.org> Content-Language: en-US In-Reply-To: <20241203112241.6713-1-skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9E901D80A2F39FF5FAF566D1880A11FC0F8E9D4B0847FDB00182A05F53808504046024F36D98418EE3DE06ABAFEAF670539C2CCEE125A5E75C277C9217885DF66459A72DE8AD892F7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7FFA2A8BF6367A61CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637968EC5F77C2942FE8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D86DA2F8BB5DCE9DAB9C8D7BDFF2E5A010348A5E33E9453D44CC7F00164DA146DAFE8445B8C89999728AA50765F790063793270F7220657A0A389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8B861051D4BA689FCF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CF254576263B31EA9040F9FF01DFDA4A84AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C3B1CCBFDB748CB1BDBA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF17B107DEF921CE791DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3F8A0C55DE5E8D0B235872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A54F47A9DE1AA76AA45002B1117B3ED6962A03B651E7CD69CF5B6221DB6D7A72AD823CB91A9FED034534781492E4B8EEADA91A6E18C88C5E2F X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF63D956C070CAF8EEF88220584037DF175DDEF264D2792BE52634516DDAEE2F6E8657CCA151A12AF5494E10A735AF7C93062AC531FBE4EB955868CC51BD98C43A5B46E4AD409707BD5F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojwp1kXJWyJOYBG8KyzHMuiA== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D6140AC093B685B43EB75479CDAE959BF642415CDBDA70E1537A60152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] test: skip test for table bump 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. --------------gX4wsVb7cxwI3pvzHqWcyU5G Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey, thanks for the patch! LGTM On 03.12.2024 14:22, Sergey Kaplun wrote: > If the `foo()` function itself starts to be recorded on the very first > call, it leads to the changing of TNEW bytecode when table bump > optimization is enabled. This patch skips the test for this type of > build. > --- > > Branch:https://github.com/tarantool/luajit/tree/skaplun/fix-luajit-tests-tablebump > > test/LuaJIT-tests/CMakeLists.txt | 8 ++++++++ > test/LuaJIT-tests/lib/string/dump.lua | 2 +- > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt > index 019762e0..d29bcb6e 100644 > --- a/test/LuaJIT-tests/CMakeLists.txt > +++ b/test/LuaJIT-tests/CMakeLists.txt > @@ -62,6 +62,14 @@ if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512") > list(APPEND LUAJIT_TEST_TAGS_EXTRA +avx512) > endif() > > +if(LUAJIT_ENABLE_TABLE_BUMP) > + # Test verifies that the bytecode is unchanged > + # for the prototype with the recorded trace. Table bump > + # optimization changes the TNEW/TDUP bytecodes, so skip the test > + # in that case. > + list(APPEND LUAJIT_TEST_TAGS_EXTRA +table_bump) > +endif() > + > set(TEST_SUITE_NAME "LuaJIT-tests") > > # XXX: The call produces both test and target > diff --git a/test/LuaJIT-tests/lib/string/dump.lua b/test/LuaJIT-tests/lib/string/dump.lua > index 216c6eb8..9c29ac50 100644 > --- a/test/LuaJIT-tests/lib/string/dump.lua > +++ b/test/LuaJIT-tests/lib/string/dump.lua > @@ -1,6 +1,6 @@ > local loadstring = loadstring or load > > -do --- Must unpatch modified bytecode with ILOOP/JLOOP etc. > +do --- Must unpatch modified bytecode with ILOOP/JLOOP etc. -table_bump > local function foo() > local t = {} > for i=1,100 do t[i] = i end --------------gX4wsVb7cxwI3pvzHqWcyU5G Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey,

thanks for the patch! LGTM

On 03.12.2024 14:22, Sergey Kaplun wrote:
If the `foo()` function itself starts to be recorded on the very first
call, it leads to the changing of TNEW bytecode when table bump
optimization is enabled. This patch skips the test for this type of
build.
---

Branch: https://github.com/tarantool/luajit/tree/skaplun/fix-luajit-tests-tablebump

 test/LuaJIT-tests/CMakeLists.txt      | 8 ++++++++
 test/LuaJIT-tests/lib/string/dump.lua | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt
index 019762e0..d29bcb6e 100644
--- a/test/LuaJIT-tests/CMakeLists.txt
+++ b/test/LuaJIT-tests/CMakeLists.txt
@@ -62,6 +62,14 @@ if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512")
   list(APPEND LUAJIT_TEST_TAGS_EXTRA +avx512)
 endif()
 
+if(LUAJIT_ENABLE_TABLE_BUMP)
+  # Test <string/dump.lua> verifies that the bytecode is unchanged
+  # for the prototype with the recorded trace. Table bump
+  # optimization changes the TNEW/TDUP bytecodes, so skip the test
+  # in that case.
+  list(APPEND LUAJIT_TEST_TAGS_EXTRA +table_bump)
+endif()
+
 set(TEST_SUITE_NAME "LuaJIT-tests")
 
 # XXX: The call produces both test and target <LuaJIT-tests-deps>
diff --git a/test/LuaJIT-tests/lib/string/dump.lua b/test/LuaJIT-tests/lib/string/dump.lua
index 216c6eb8..9c29ac50 100644
--- a/test/LuaJIT-tests/lib/string/dump.lua
+++ b/test/LuaJIT-tests/lib/string/dump.lua
@@ -1,6 +1,6 @@
 local loadstring = loadstring or load
 
-do --- Must unpatch modified bytecode with ILOOP/JLOOP etc.
+do --- Must unpatch modified bytecode with ILOOP/JLOOP etc. -table_bump
   local function foo()
     local t = {}
     for i=1,100 do t[i] = i end
--------------gX4wsVb7cxwI3pvzHqWcyU5G--