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 8397268F42; Fri, 26 Mar 2021 10:51:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8397268F42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616745073; bh=eg7rgaeNam3MxaUXo6OhAqqquX8GGEwBnhCf+TNOCyI=; 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=kS8qSomVFF2f5uY7JRN2Gow0uRoDnHHJ5Xxo4VxCS45CGuPlUrWSIcZJ93cie10pk Ihve5OxBSRNA6hmiJE2B53GuG7iw/bDPIVUBq7atyCWIsJ1M0XhVeV3WwvJsB80zJp CPE4u905zxUDLQH09vUcVq0Au0dO/9IjbnDJK2u0= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (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 4E90A68F42 for ; Fri, 26 Mar 2021 10:44:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4E90A68F42 Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1lPh8q-00042u-7R; Fri, 26 Mar 2021 10:44:24 +0300 To: Sergey Ostanevich , Igor Munkin Date: Fri, 26 Mar 2021 10:42:57 +0300 Message-Id: <679ac3ff8cbcf449c2e47cc9d4446c3dcf0300d1.1616743343.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: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9064ADF4728AA0EE92C031F1727A757A9F762E9876BADF49A182A05F538085040E2C49A07CD23323F20EE3F035A7337374191F8E979F7E60B338C0FBAB839397F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70CB15FA6C489297DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378A9F193E39E334918638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5DFF3ADF602D4B7D831BBA2BC04672CBEEA471835C12D1D9774AD6D5ED66289B5278DA827A17800CE78C592797616C97AB9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C353FA85A707D24CADCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CFC5EA940A35A165FF2DBA43225CD8A89F890A246B268E114EC6EABA9B74D0DA47B5C8C57E37DE458BEDA766A37F9254B7 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2AD77751E876CB595E8F7B195E1C97831181D79FD8B28A83535502B711E68CC32 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C5DD32608FC869F5DFF3ADF602D4B7D831BBA2BC04672CBEE9C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFF532FBFD8162E58C699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A08F09726D78E07BD0DE8E3810F658819396F0C9E0405CA83CF9EFCB480240641FD52D61514F24211D7E09C32AA3244C87BCA3E103CF1E931BCB543B97430D96A95CA90A1D8AC565927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAh2Ez/nAOpY2A== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB41D7712D7543432DAC37CE200D0FCECB73A7118BD1B7E0120F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit 14/30] test: adapt activeline check in the PUC Lua test 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" LuaJIT does not report line with single "end" statement (the last line of the function) as an active line in debug.getinfo(), unlike Lua does. There is no bytecode related to this line, so it is "unreachable" and may be considered not active. This patch excludes the last line of a function from the check, considering LuaJIT's behaviour. Closes tarantool/tarantool#5708 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 --- test/PUC-Lua-5.1-tests/db.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua index b363abc..c704877 100644 --- a/test/PUC-Lua-5.1-tests/db.lua +++ b/test/PUC-Lua-5.1-tests/db.lua @@ -491,7 +491,15 @@ local _, l = coroutine.resume(co, 10) local x = debug.getinfo(co, 1, "lfLS") assert(x.currentline == l.currentline and x.activelines[x.currentline]) assert(type(x.func) == "function") -for i=x.linedefined + 1, x.lastlinedefined do +-- LuaJIT does not report line with single "end" statement +-- (the last line of the function) as an active line in +-- debug.getinfo(), unlike Lua does. There is no bytecode +-- related to this line, so it is "unreachable" and +-- may be considered not active. +-- See also https://github.com/tarantool/tarantool/issues/5708. +-- LuaJIT: Test is adapted for LuaJIT's behaviour by avoiding +-- the last line check. +for i=x.linedefined + 1, x.lastlinedefined - 1 do assert(x.activelines[i]) x.activelines[i] = nil end -- 2.31.0