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 170DB6EC60; Wed, 31 Mar 2021 12:51:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 170DB6EC60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617184317; bh=ozg+dxW5hSFB2qc4CiBwOAq7B1Cm66ved9BR/E6IHX0=; 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=pJ63OrnQRWa4TTJ3EYcZwPbgN3Q/ixSt2EY3HJFIyH4LXeCez4dZiJJrUfO5f6e0W xom5QrbeG9r7/T6IhNaprRkmHUYbg51X5+ApCUnQkSp+rC+VQtTgs9QVSrgNd+t6Ah Mg1Ya081dGXm5cMz3svrbuwZOFKNP9CJ2fFJLrmU= Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 2296B6EC60 for ; Wed, 31 Mar 2021 12:51:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2296B6EC60 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1lRXVy-0007l2-V3; Wed, 31 Mar 2021 12:51:55 +0300 Date: Wed, 31 Mar 2021 12:51:45 +0300 To: Sergey Kaplun Message-ID: <20210331095145.GG29703@tarantool.org> References: <422eaeb77d4cb957338af0bdc0151ae7787e1567.1616743343.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <422eaeb77d4cb957338af0bdc0151ae7787e1567.1616743343.git.skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947A0146560F8BA709E798FFD99D1B1662182A05F538085040505E17B5A884DB23A3937689EB150FD7385FB5CD1B1B6AD8DC8D1CAD2C255F82 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70043D879A87EF1BCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006377A7A7D315BEE81B48638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CE99938B3FD79E1DF538ACF09EECD84FFFD6220D8D6524DE7A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7328B01A8D746D8839FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E478A468B35FE767117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE493D58E677C372A3F4780CB4917E5AABA03C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A52605A9E5636CAB9FA9B6DD0B39A8CA78A4B42D834AD9A7ADD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D6AC337C1E637B8AB8BCB2C8232D08179FD91A1A811C85489AED595B3146819E9E1AC81F586EF2651D7E09C32AA3244C046C98E18AB0F461296186F73B2DD43D6C24832127668422927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojfQIxm2xDGoabth4omH/n6A== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822405F9E12679BFE309E6400C69FF56931A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 20/30] test: adapt PUC Lua test for args in 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: 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! I can't understand why this patch is separated from the previous two (10 and 11). Could you provide a rationale for this, please? Also consider the comments below. On 26.03.21, Sergey Kaplun wrote: > Lua 5.1 interprets ... in the vararg functions like additional first Typo: s/like additional/as an additional/. > argument, unlike LuaJIT does. All extra arguments is set into `arg` Typo: s/arguments is set/arguments are set/. > variable. > > Implicit `arg` parameter for old-style vararg functions was finally > removed in Lua 5.2. This patch adjust tests in vararg.lua considering Minor: Did LuaJIT always respect such behaviour? If no, please mention the commit where it has been changed. > Lua 5.2 test suite taken from > https://www.lua.org/tests/lua-5.2.0-tests.tar.gz. > > Closes tarantool/tarantool#5712 As we discussed before: s/Closes/Resolves/. > Part of tarantool/tarantool#5845 > Part of tarantool/tarantool#4473 > --- > test/PUC-Lua-5.1-tests/vararg.lua | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/test/PUC-Lua-5.1-tests/vararg.lua b/test/PUC-Lua-5.1-tests/vararg.lua > index ae068fa..efb76c5 100644 > --- a/test/PUC-Lua-5.1-tests/vararg.lua > +++ b/test/PUC-Lua-5.1-tests/vararg.lua > @@ -2,9 +2,13 @@ print('testing vararg') > > _G.arg = nil > > +-- Lua 5.1 interprets ... in the vararg functions like additional Typo: s/like additional/as an additional/. > +-- first argument, unlike LuaJIT does. All extra arguments is set Typo: s/arguments is set/arguments are set/. > +-- into `arg` variable. This extension is from Lua 5.2. > +-- See also https://github.com/tarantool/tarantool/issues/5712. Side note: What is the difference between #5712 and #5694? They look like duplicates to me, and so provide another rationale for squashing all three patches into a single one. > +-- LuaJIT: Test is adapted from PUC-Rio Lua 5.2 test suite. > function f(a, ...) > - assert(type(arg) == 'table') > - assert(type(arg.n) == 'number') > + local arg = {n = select('#', ...), ...} Why did you drop the assertions above? They are trivial (as many of others in this suite), but still check that everything is fine (e.g. that