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 C9D4D70370; Mon, 6 Feb 2023 11:34:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C9D4D70370 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1675672475; bh=CJE+pjoJMbiXvdkelsI6DC80X5YfS3s3ZeHVGJhJPNA=; 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=DILQXdaEoW/MMGz5iJQEVl2sImxts/fdB21fhY5gNsb/q14T9+C2l2dt81/Ag0Ckc uBjbxyIFoDH+uy1bA0FF6OjEPG4rePEuaHnNFBSvH9JOt/Uph3hxvRkdQ58+EgE6IC p6tVMdInExxkcolWRJFuldlYOvh0QRbJLRr8p3Rg= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [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 529D370370 for ; Mon, 6 Feb 2023 11:34:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 529D370370 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1pOwxN-0007VD-Cg; Mon, 06 Feb 2023 11:34:33 +0300 Date: Mon, 6 Feb 2023 11:31:04 +0300 To: Sergey Bronnikov Message-ID: References: <821de7208007ffc8f10222761dd264cf0c4a0bb4.1675669159.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <821de7208007ffc8f10222761dd264cf0c4a0bb4.1675669159.git.sergeyb@tarantool.org> X-Mailru-Src: smtp X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D919194CF4FC6604C1327866F5A8C54978C2C29D2B5E24A7182A05F5380850405A64C9AA1B4AD48B12ACE3072E8927A03C7F964A9686225153900C971C0DFA5E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AEA4A6B3AFC9B957C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE79379E597596E9183EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B6F1F7B995052D5CEA3F875BCA7309F956E9B13457629C2B1CC7F00164DA146DAFE8445B8C89999728AA50765F790063793270F7220657A0A389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8EE16715F795C715CF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B696E4123C2B4120575ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D341776B9FDE05FBA7AC48F56205EDA02E235B01516ACD6F8CBE623A2DCDD38BD992A463D40EA5A5A7C1D7E09C32AA3244CE2494CB0920DF1CCB1A442553D5C203A7C0C08F7987826B9927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj6shc/GkzDh1FU5atPRTANw== X-DA7885C5: 8A7832FEB99AFDAE5E846728F9D66D3A847C16FB3EDDD029265CA3CD485D63E6262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73933AF1F914F131DBF5B902357CDAD8DF72229D7D3D153879880FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] test: disable cases in PUC-Rio tests for debug 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" Hi, Sergey! Thanks for the patch! Please consider my comments below. On 06.02.23, Sergey Bronnikov wrote: > From: Sergey Bronnikov > > In order to fix issue [1] it is required to introduce a wrapper for > `__pairs()`. This wrapper breaks a couple of tests for builtin debug IINM, it's not for the metamethod `__pairs`, but for the built-in function `pairs()`. > module. ^ Those tests rely on specific backtrace, which is changed by an additional wrapper for `pairs()`. > Patch disables testcases when running under Tarantool. > > 1. https://github.com/tarantool/tarantool/issues/2867 > --- > test/PUC-Rio-Lua-5.1-tests/db.lua | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/test/PUC-Rio-Lua-5.1-tests/db.lua b/test/PUC-Rio-Lua-5.1-tests/db.lua > index b148c2dd..b05075bb 100644 > --- a/test/PUC-Rio-Lua-5.1-tests/db.lua > +++ b/test/PUC-Rio-Lua-5.1-tests/db.lua > @@ -169,10 +169,12 @@ test([[for i=1,3 do > end > ]], {1,2,1,2,1,2,1,3}) > > +if not _TARANTOOL then Minor: It will be nice to add the comment about the wrapper for `pairs()` in Tarantool here. > test([[for i,v in pairs{'a','b'} do > a=i..v > end > ]], {1,2,1,2,1,3}) > +end > > -- Test is adapted to the behaviour of LuaJIT, as it generates > -- only four line events, unlike Lua, which generates five > @@ -411,7 +413,9 @@ function g1(x) g(x) end > > local function h (x) local f=g1; return f(x) end > > +if not _TARANTOOL then > h(true) > +end These changes don't fix the problem for the test in LuaJIT [1]: | src/luajit: test/PUC-Rio-Lua-5.1-tests/db.lua:403: assertion failed! | stack traceback: | [C]: in function 'assert' | test/PUC-Rio-Lua-5.1-tests/db.lua:403: in function 'g' | test/PUC-Rio-Lua-5.1-tests/db.lua:412: in function 'h' | test/PUC-Rio-Lua-5.1-tests/db.lua:417: in function '_dofile' | test/PUC-Rio-Lua-5.1-tests/all.lua:89: in main chunk | [C]: at 0x56039b641064 As far as the linedefined number for `g1()` function is changed. I suggest the following patch (without comments to add) (haven't checked it on Tarantool): =================================================================== diff --git a/test/PUC-Rio-Lua-5.1-tests/db.lua b/test/PUC-Rio-Lua-5.1-tests/db.lua index b05075bb..550debdc 100644 --- a/test/PUC-Rio-Lua-5.1-tests/db.lua +++ b/test/PUC-Rio-Lua-5.1-tests/db.lua @@ -400,7 +400,7 @@ local function f (x) if x then assert(debug.getinfo(1, "S").what == "Lua") local tail = debug.getinfo(2) - assert(tail.what == "Lua" and tail.linedefined == 410 and tail.func == g1) + assert(tail.what == "Lua" and tail.linedefined == 412 and tail.func == g1) assert(getfenv(3)) assert(debug.getinfo(3, "S").what == "main") print"+" @@ -413,9 +413,7 @@ function g1(x) g(x) end local function h (x) local f=g1; return f(x) end -if not _TARANTOOL then h(true) -end local b = {} debug.sethook(function (e) table.insert(b, e) end, "cr") =================================================================== > > local b = {} > debug.sethook(function (e) table.insert(b, e) end, "cr") > -- > 2.34.1 > [1]: https://github.com/tarantool/luajit/actions/runs/4101439522/jobs/7073225472 -- Best regards, Sergey Kaplun