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 D14AB6EC60; Thu, 1 Apr 2021 02:01:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D14AB6EC60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617231696; bh=TcYD30+HXrtZxd7s5QSvhUJeqWs2BvrSmqNLVUdLgp4=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=JbomWVtgCyDo1JM97lsDWS6ECLEAuzTbd2p1iGq5lnJD8LaUERdawlUU1uyt/v2ni ZPRak2iTC1OWjz9jDsjot0eGHy5GDKP8duPcazRV2PC7fx+CWIwdBMlH0xq3LTNSyb Lap/jHhC2lbfH//52KBHgioVdpWmuMKrovxhTjmw= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 083916BD02 for ; Thu, 1 Apr 2021 01:59:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 083916BD02 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lRjoI-0000DQ-Uy; Thu, 01 Apr 2021 01:59:39 +0300 Date: Thu, 1 Apr 2021 01:59:29 +0300 To: Sergey Kaplun Message-ID: <20210331225929.GZ29703@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947287414FD1D04A09E656A5F3377C994A182A05F538085040CE7D79A7C51DABFE6953FE214EBC37EBD76F19F6611112A9924703B30483830B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B9FBA884A7C9B8BAEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375D8840FA58F505298638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CE99938B3FD79E1DF0A1EF4E642E52C3940C449295F975F06A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE74A95F4E53E8DCE969FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C37EF884183F8E4D67117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735B58781B77DE60D36C4224003CC83647689D4C264860C145E X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2AD77751E876CB595E8F7B195E1C97831D2B5125A4351B8209BB839037DF3A6B5 X-C1DE0DAB: 0D63561A33F958A5C8E99B5B4912CB5AD8481CC149D26F9C461A71EE16DCEBCED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349C39CCCDAABCB54BE59E71DB247290AAF25FDFAFF84F1142CF4A37EB311E03C1751C779101B0A6661D7E09C32AA3244CD56F297E64E02CADE5B84A3AC50FF539D08D48398F32B4A6927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojetunDCtJ20I0dmP9WwcL2w== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822C5580594A844603B3A40CE02A23EAE8EA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Thanks for the patch! Please consider the comments below. On 26.03.21, Sergey Kaplun wrote: > FIXME: LuaJIT interprets a return from a new function loaded by Typo: FIXME is excess here (looks like the comment copy-paste). > `loadstring()` with a change line number for bytecode position > unlike Lua does. This looks like "implementation-defined behaviour" Sorry, I can't understand what is written here, though I understand that there is a difference between Lua and LuaJIT behaviour and the example below. Could you please clarify the sentence above? > mentioned in https://luajit.org/status.html. > > All tests checked the debug hook for a new line of code are affected Typo: s/tests checked/tests checking/. > 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. Meh, I also failed to understand the wording here... > +-- 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 Typo: s/diference/difference/. > +-- (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 > -- Best regards, IM