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 D831F6F3C7; Fri, 26 Mar 2021 17:46:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D831F6F3C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616770009; bh=pIP7hrhuKuUQYMeXph7CryR3CNRTDGFa2QxmkJND2nk=; 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=uYHXPfAQkmKDuGP5yNiL3nCZ7qM1JAQFJPfeVXtw+AFLdLhwy/vCbkeWkXXwCfRur emiSQT4hFCw0eqgb+bufHW50i3yHJTK/PV5kDDU4SZ8523p3E6a4N92wwC5WxNH2IN /YeuCFG3qx8nn7HI1RwJwMjRITVeEQBJDDXkxl3U= Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [94.100.177.95]) (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 42A406F3C7 for ; Fri, 26 Mar 2021 17:46:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 42A406F3C7 Received: by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1lPnjb-0006PC-AH; Fri, 26 Mar 2021 17:46:47 +0300 Date: Fri, 26 Mar 2021 17:45:54 +0300 To: Sergey Ostanevich Message-ID: References: <2a4f7f1c49f5c9c0ffd1a512d809588f7a7694db.1616743343.git.skaplun@tarantool.org> <6918F7E4-8123-4002-BEE4-DDA46388933E@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6918F7E4-8123-4002-BEE4-DDA46388933E@tarantool.org> X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E3294294B90A37D0C277F3D6300B1E29D1C98182A05F5380850404E4E409C371D94459F082F25D51304C9A771496C2A2FF9A1A84AB7CC20D9C576 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7CE4525FFB91B9BBCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CF20B9B7F5DD35A68638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5D849EE09C5ABBAFB2ADF5520A01549711A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7328B01A8D746D8839FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C37EF884183F8E4D67117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7352B32DCB92A8600C6C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A576B5F9B02E6971B07A5D1E66186394BCCF13493846AAAF45D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34ECB3E21D3CD9CB4FCB7993EF342D0A2B666BE1AE0CA2AB80FEF57A0342F61453A8D858A54392ABB51D7E09C32AA3244C997B5F71D8921D686D3F487DD813BD533A92A9747B6CC886FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAi9HsssUq3csg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB42BF4114108758CE9ACF1C10F3001C406C0B2B08755F7420EF2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 10/30] test: adapt test for debug.setlocal in Lua suite 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, thanks for the review! On 26.03.21, Sergey Ostanevich wrote: > LGTM, minor update to message > > Sergos > > > On 26 Mar 2021, at 10:42, Sergey Kaplun wrote: > > > > LuaJIT: Lua 5.1 interprets `...` in the vararg functions like > > an additional first argument unlike LuaJIT does. > ^^^^^^^^^^^ means local? > So, that getlocal() later in g() works as expected? Yes, local is correct. Update commit message and the comment, branch is force-pushed. See the iterative patch below. The new commit message is: =================================================================== test: adapt test for debug.setlocal in Lua suite LuaJIT: Lua 5.1 interprets `...` in the vararg functions like an additional local argument unlike LuaJIT does. This behaviour is extension is from Lua 5.2. This patch adapted test considering LuaJIT's and Lua 5.2 behaviour. The test is adapted like it done in Lua 5.2 test suite taken from https://www.lua.org/tests/lua-5.2.0-tests.tar.gz. Part of tarantool/tarantool#5694 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 =================================================================== =================================================================== diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua index e5d8885..6535594 100644 --- a/test/PUC-Lua-5.1-tests/db.lua +++ b/test/PUC-Lua-5.1-tests/db.lua @@ -222,7 +222,7 @@ assert(debug.getinfo(1, "l").currentline == L+11) -- check count of lines function g(...) -- LuaJIT: Lua 5.1 interprets `...` in the vararg functions like - -- an additional first argument unlike LuaJIT does. + -- an additional local argument unlike LuaJIT does. -- This extension is from Lua 5.2. -- See also https://github.com/tarantool/tarantool/issues/5694. -- Test is adapted from PUC-Rio Lua 5.2 test suite by adding =================================================================== > > > This behaviour is extension is from Lua 5.2. > > > > This patch adapted test considering LuaJIT's and Lua 5.2 behaviour. > > The test is adapted like it done in Lua 5.2 test suite taken from > > https://www.lua.org/tests/lua-5.2.0-tests.tar.gz. > > > > Closes tarantool/tarantool#5694 Part of is more correct here. > > Part of tarantool/tarantool#5845 > > Part of tarantool/tarantool#4473 > > --- > > test/PUC-Lua-5.1-tests/db.lua | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua > > index a8c7196..e5d8885 100644 > > --- a/test/PUC-Lua-5.1-tests/db.lua > > +++ b/test/PUC-Lua-5.1-tests/db.lua > > @@ -221,6 +221,13 @@ assert(debug.getinfo(1, "l").currentline == L+11) -- check count of lines > > > > > > function g(...) > > + -- LuaJIT: Lua 5.1 interprets `...` in the vararg functions like > > + -- an additional first argument unlike LuaJIT does. > > + -- This extension is from Lua 5.2. > > + -- See also https://github.com/tarantool/tarantool/issues/5694. > > + -- Test is adapted from PUC-Rio Lua 5.2 test suite by adding > > + -- additional variable `arg`. > > + local arg = {...} > > do local a,b,c; a=math.sin(40); end > > local feijao > > local AAAA,B = "xuxu", "mam�o" > > -- > > 2.31.0 > > > -- Best regards, Sergey Kaplun