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 9A47C6F3C7; Fri, 26 Mar 2021 14:47:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9A47C6F3C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616759270; bh=DuFO2eZLg/gnOi7CFryO/o0skDTErT5pOhDgmqsny5w=; 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=DV7e/bpRrpYsj/Kimp++ktht7XFJ4fe8sOiKxqf6OFDJM+72gIHXxt7NIebGx6/4c WV2Vi/PiJZNLOEH/CCsnLwCDnQPy+iT1QwvfsNLjRnUkH9bWEwicvPno+0Kaw0n2Fz GYz7n800yPbAVHQq8pqH1ZY4KJSlRAmuXQAQi9Ow= Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 E3C626F3C7 for ; Fri, 26 Mar 2021 14:47:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E3C626F3C7 Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1lPkwO-00026D-9n; Fri, 26 Mar 2021 14:47:48 +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: <0bf0dc418d1095fc5c8d3901469662c853fb93de.1616743343.git.skaplun@tarantool.org> Date: Fri, 26 Mar 2021 14:47:47 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <9A6CD2DD-6FFC-448B-9873-C320F7AA0D49@tarantool.org> References: <0bf0dc418d1095fc5c8d3901469662c853fb93de.1616743343.git.skaplun@tarantool.org> To: Sergey Kaplun X-Mailer: Apple Mail (2.3654.60.0.2.21) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9064ADF4728AA0EE9F947F818E4E5150DE0627C7B5DF808F3182A05F538085040423B77EDF9DA142FA4BB44C9F2DF7731C493F0C844E0070A01689F9475F5D62E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D9C4478D0B876341EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378F6D32451C4A3CAA8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5D944B4F995EBD75BED6676FBEA113A11FA471835C12D1D9774AD6D5ED66289B5278DA827A17800CE77A825AB47F0FC8649FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C327ED053E960B195E117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E73589424AA0EF8DE9BAC4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5D942737E4AFD0E05D81FC0212D50BF864FFF432FF11EC236D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3441661D6226BE8C31572CC0DC31333312C47AC2E800067F96BA6D174866B27004252C060CAA5B69691D7E09C32AA3244CB7AC780AEC6B4240F9C3F8B559D2425F4DBEAD0ED6C55A80FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAjY/pFVRkEXyQ== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81E4F89CEB70E8F9778454DCE32A229E03793E378E28B85C528AD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 11/30] test: adapt getlocal PUC test for vararg func 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: >=20 > Lua 5.1 interprets `...` in the vararg functions like an additional > first argument unlike LuaJIT does. So, `a:f()` function will not set > corresponding table `arg`, as test expects. >=20 > Implicit `arg` parameter for old-style vararg functions was finally > removed in Lua 5.2. The test is adapted from PUC-Rio Lua 5.2 test = suite > by removing additional check for amountt of arguments via `arg.n`. > Lua 5.2 test suite is taken from > https://www.lua.org/tests/lua-5.2.0-tests.tar.gz. >=20 > Part of tarantool/tarantool#5845 > Part of tarantool/tarantool#4473 > --- > test/PUC-Lua-5.1-tests/db.lua | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) >=20 > diff --git a/test/PUC-Lua-5.1-tests/db.lua = b/test/PUC-Lua-5.1-tests/db.lua > index e5d8885..6985c29 100644 > --- a/test/PUC-Lua-5.1-tests/db.lua > +++ b/test/PUC-Lua-5.1-tests/db.lua > @@ -300,7 +300,16 @@ debug.sethook(function (e) > end, "c") >=20 > a:f(1,2,3,4,5) > -assert(X.self =3D=3D a and X.a =3D=3D 1 and X.b =3D=3D 2 and = X.arg.n =3D=3D 3 and X.c =3D=3D nil) > + > +-- LuaJIT: Lua 5.1 interprets `...` in the vararg functions like > +-- an additional first argument unlike LuaJIT does. > +-- So, `a:f()` function will not set corresponding table `arg`, > +-- as test expects. > +-- Implicit `arg` parameter for old-style vararg functions was > +-- finally removed in Lua 5.2 > +-- The test is adapted from PUC-Rio Lua 5.2 test suite by removing > +-- additional `arg.n =3D=3D 3` check. > +assert(X.self =3D=3D a and X.a =3D=3D 1 and X.b =3D=3D 2 and X.c =3D=3D= nil) > assert(XX =3D=3D 12) > assert(debug.gethook() =3D=3D nil) >=20 > --=20 > 2.31.0 >=20