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 D6BD16B944; Tue, 13 Apr 2021 16:34:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D6BD16B944 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618320842; bh=X+psBCfUWeC0bosZAmOgK0GBam1mEHfgtqGaKDCf4Yw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=vwJyHbZahhXWrulvC6rnYwh6THrzG/KUNOfFAg5FPXvOmsuxjYgjDy8AFSHdNVkIo iKVO0/ipahOU10SUn7bq5PUl7wb3wOcFBu+MsngAWyox28UoQQhMSQzSz6FithMyd9 /m8F3xu+esJqKRlBuWOAx9lrSf3LEj7jq8yF3O+8= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 DD7BC6B95C for ; Tue, 13 Apr 2021 16:28:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DD7BC6B95C Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lWJ5r-0000dj-TW; Tue, 13 Apr 2021 16:28:40 +0300 To: Sergey Ostanevich , Igor Munkin Date: Tue, 13 Apr 2021 16:27:11 +0300 Message-Id: <8b223a2dd502bbbf15fb30ff26eea8ba48141409.1618320000.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E74806859AC5FE18436AEED970E897805ADA4182A05F5380850406E626C0055FEC970ED7C5A7CEE50CA555FDF895FDAF3A6C124BB0DAB7B9EA850 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE721B3E54BB37EA0B4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006370F98874192B1BA168638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B24C1AB82BADDDCCE7B159F821DEED6979262F3407DF4BB9EED2E47CDBA5A96583C09775C1D3CA48CF4964A708C60C975A117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA73A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E73525A4AB119743A3B3C4224003CC83647689D4C264860C145E X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CB69F9342289A40B3850E47453A0737133BAA8E46623B31919C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF0417BEADF48D1460699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3450C5E6D685282BA14E97D53D4F467CA3374D2070782BABF5C90571EC43B8C3717238FBD992A8A70B1D7E09C32AA3244CDD9DFE9493ED014248D7A78BF18A0FD8E646F07CC2D4F3D8927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojnA7/qPBUIXF9/ojGtYInfg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB41145EFD4D09E4A130CB0C4669B49AB2CE07714D7F3A8A37BF2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit v3 11/29] test: adapt PUC-Rio test for debug 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: 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" Lua 5.1 interprets `...` in the vararg functions as an additional local argument unlike LuaJIT does. So, `a:f()` function will not set the 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 check for amount 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. Resolves tarantool/tarantool#5694 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 --- test/PUC-Rio-Lua-5.1-tests/db.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/PUC-Rio-Lua-5.1-tests/db.lua b/test/PUC-Rio-Lua-5.1-tests/db.lua index 82d1cfa6..6c412170 100644 --- a/test/PUC-Rio-Lua-5.1-tests/db.lua +++ b/test/PUC-Rio-Lua-5.1-tests/db.lua @@ -303,7 +303,16 @@ debug.sethook(function (e) end, "c") a:f(1,2,3,4,5) -assert(X.self == a and X.a == 1 and X.b == 2 and X.arg.n == 3 and X.c == nil) + +-- LuaJIT: Lua 5.1 interprets `...` in the vararg functions as +-- an additional local argument unlike LuaJIT does. +-- So, `a:f()` function will not set the 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 == 3` check. +assert(X.self == a and X.a == 1 and X.b == 2 and X.c == nil) assert(XX == 12) assert(debug.gethook() == nil) -- 2.31.0