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 A777F6F3C7; Fri, 26 Mar 2021 10:48:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A777F6F3C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616744921; bh=1SgkU7UbytXC/FtqYiPPNsbEDGHCvGlKdWNakJndpmc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Z1+8csvpTpXyhTIhoOW6543R+ZaEBIihV8TXNbRFspQvo+zuilX1lP1ocNC7nEvGP 2phge9/vF5C+fxa6DiQVFxiWoVLtTN97J6w8k5FuwrkwWyu21GuLkiUsN4MUlh4fIr Fu0l9rScsYcHeFsLlXmExLE0t4dnj37q+pE7AOG4= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 4A5C26B469 for ; Fri, 26 Mar 2021 10:44:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4A5C26B469 Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1lPh8i-00042u-9v; Fri, 26 Mar 2021 10:44:16 +0300 To: Sergey Ostanevich , Igor Munkin Date: Fri, 26 Mar 2021 10:42:52 +0300 Message-Id: X-Mailer: git-send-email 2.31.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9064ADF4728AA0EE919EF87AC0718675712B828C563C11F50182A05F5380850401C1A6EAEEC899CFC37830DC62D548C5B3BC87EEB4443CFACBD18DB83BCE98E94 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7370F4F695FFFC24BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063706922F90966A37BA8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5DA1E47ABB45CA7FAEABE70C686F0EE6D7A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE79AE9BAF3542BD4619FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C362968DCAA3E4B45B117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7351D6A3D1828C120DEC4224003CC83647689D4C264860C145E X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C5DD32608FC869F5DA1E47ABB45CA7FAEABE70C686F0EE6D79C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFF532FBFD8162E58C699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34CC972AA0E2E780C4EA5568FFDF959CCF8ADF09BFA0F3905A0AFA47F8CA014D4CABDAF20C195FD5731D7E09C32AA3244C1006B000E3E03EB667082E88C3A918F960759606DA2E136A927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAh2DEt3r3/HCw== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4202EE78BEBCF7FBBC37CE200D0FCECB72ED37A98FC022353F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit 09/30] test: disable Lua suite tests for line hook 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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" FIXME: LuaJIT interprets a return from a new function loaded by `loadstring()` with a change line number for bytecode position unlike Lua does. This looks like "implementation-defined behaviour" mentioned in https://luajit.org/status.html. All tests checked the debug hook for a new line of code are affected and disabled by this patch. Relates to tarantool/tarantool#5693 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 --- test/PUC-Lua-5.1-tests/db.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua index 9d2c86f..a8c7196 100644 --- a/test/PUC-Lua-5.1-tests/db.lua +++ b/test/PUC-Lua-5.1-tests/db.lua @@ -95,6 +95,23 @@ repeat assert(g(f) == 'a') until 1 +-- FIXME: LuaJIT interprets a return from calling result of +-- `loadstring()` with a new line number unlike Lua does. +-- Here is an example (it is joined in one line intend): +--[[ +debug.sethook(function(_, l) print("LINE: "..l) end, "l") loadstring("\n\ns=nil")() debug.sethook() +--]] +-- This chunk prints for LuaJIT: +--[[ +LINE: 3 +LINE: 1 +--]] +-- But for Lua 5.1 it is only "LINE: 3" in the output. +-- See also https://github.com/tarantool/tarantool/issues/5693. +-- Considering implementation-defined behaviour diference +-- (see also https://luajit.org/status.html) test is disabled for +-- LuaJIT. +--[=[ test([[if math.sin(1) then @@ -149,7 +166,7 @@ end ]], {1,2,1,2,1,3}) test([[for i=1,4 do a=1 end]], {1,1,1,1,1}) - +--]=] print'+' -- 2.31.0