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 17E666F3C7; Fri, 26 Mar 2021 17:43:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 17E666F3C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616769831; bh=LN4+IsXh7ePSNQKPOZStJd3nEbelydrLSk1TJcYSUgs=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Ek2f6Zg/7C7veF1fMXpBXE8hBRagqZdMlMM33zpm93n9iVxlXRMWSbaYzzuA+e1ap tlqwGS48F4Hap2sH742OwA+ck6AGPynpQu1thfdHR8PBTPlDF9gXQ3fDJjhXOBoT2u RgsCqzlutP7zEBH0ewxQUU59axL2Z/X/O6TkoBA8= Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (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 C9F106F3C7 for ; Fri, 26 Mar 2021 17:43:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C9F106F3C7 Received: by smtp53.i.mail.ru with esmtpa (envelope-from ) id 1lPngi-0008Hg-TI; Fri, 26 Mar 2021 17:43:49 +0300 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) In-Reply-To: <43c7a2668c9d3935e792363a7a6536a4801e28a8.1616743343.git.skaplun@tarantool.org> Date: Fri, 26 Mar 2021 17:43:47 +0300 Content-Transfer-Encoding: 7bit Message-Id: <24ECDECE-9C0C-4965-B095-DA6DA991B366@tarantool.org> References: <43c7a2668c9d3935e792363a7a6536a4801e28a8.1616743343.git.skaplun@tarantool.org> To: Sergey Kaplun X-Mailer: Apple Mail (2.3654.60.0.2.21) X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947A0146560F8BA709498CFB6209D8582A182A05F53808504053C79922FC565059BE5FAEA8BCC004CB1C73780DD977D60F27B9135E606B2CE2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77633BACAB33B9508C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE7081BBE264C6D7F42EA1F7E6F0F101C67CDEEF6D7F21E0D1D174C73DBBBFC7664EDE5E72C55F604D2875A706410ED992FC1744DB128D42AEC389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A29E2F051442AF778941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6F459A8243F1D1D44CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CFC5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E6252C6EABA9B74D0DA47B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5B4A788B5272394CD5DDEC5A188B6BD510A103A479D249178D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34505665BFD4C70705527F6212727469FC4D8F98282AA83FCA74C01FA0414B48D2C04EF4AF4A7734191D7E09C32AA3244C48F4CEAAEB1F0AFFC27BB780447A180681560E2432555DBBFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAjykZmqFiXA4g== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81E081B38082941D6322D638A3BBB0EA656CBD8F9D86EB4425CAD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 13/30] test: disable PUC Lua test for tail call info 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 Ostanevich via Tarantool-patches Reply-To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" LGTM. Sergos > On 26 Mar 2021, at 10:42, Sergey Kaplun wrote: > > LuaJIT does not provide information about tail calls in debug.getinfo(), > unlike Lua does. This missed feature is described in > https://luajit.org/status.html. > > This patch disables tests for tail call checks and getfenv() checks, > because tail calls do not provide an additional level for LuaJIT > and level number given to getfenv() should be changed. > > Relates to tarantool/tarantool#5702 > Relates to tarantool/tarantool#5703 > Part of tarantool/tarantool#5845 > Part of tarantool/tarantool#4473 > --- > test/PUC-Lua-5.1-tests/db.lua | 30 ++++++++++++++++++++++-------- > 1 file changed, 22 insertions(+), 8 deletions(-) > > diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua > index c1a635a..b363abc 100644 > --- a/test/PUC-Lua-5.1-tests/db.lua > +++ b/test/PUC-Lua-5.1-tests/db.lua > @@ -400,19 +400,29 @@ function g1(x) g(x) end > > local function h (x) local f=g1; return f(x) end > > -h(true) > +-- LuaJIT does not provide information about tail calls, > +-- unlike Lua does. See also https://luajit.org/status.html. > +-- getfenv() behaviour is also different here, > +-- because tail calls do not provide additional level for LuaJIT > +-- and level number should be changed. > +-- FIXME: Test is disabled for LuaJIT. > +-- See also https://github.com/tarantool/tarantool/issues/5702. > +-- h(true) > > local b = {} > -debug.sethook(function (e) table.insert(b, e) end, "cr") > -h(false) > -debug.sethook() > +-- Behavior is different for LuaJIT. See the comment above. > +-- FIXME: Test is disabled for LuaJIT. > +-- debug.sethook(function (e) table.insert(b, e) end, "cr") > +-- h(false) > +-- debug.sethook() > local res = {"return", -- first return (from sethook) > "call", "call", "call", "call", > "return", "tail return", "return", "tail return", > "call", -- last call (to sethook) > } > -for _, k in ipairs(res) do assert(k == table.remove(b, 1)) end > - > +-- Behavior is different for LuaJIT. See the comment above. > +-- FIXME: Test is disabled for LuaJIT. > +-- for _, k in ipairs(res) do assert(k == table.remove(b, 1)) end > > lim = 30000 > local function foo (x) > @@ -423,7 +433,9 @@ local function foo (x) > end > end > > -foo(lim) > +-- Behavior is different for LuaJIT. See the comment above. > +-- FIXME: Test is disabled for LuaJIT. > +-- foo(lim) > > > print"+" > @@ -459,7 +471,9 @@ end > > local co = coroutine.create(f) > coroutine.resume(co, 3) > -checktraceback(co, {"yield", "db.lua", "tail", "tail", "tail"}) > +-- Behavior is different for LuaJIT. See the comment to h() above. > +-- FIXME: Test is disabled for LuaJIT. > +-- checktraceback(co, {"yield", "db.lua", "tail", "tail", "tail"}) > > > co = coroutine.create(function (x) > -- > 2.31.0 >