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 38E206B95F; Tue, 13 Apr 2021 16:35:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 38E206B95F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618320932; bh=1rzEvxDBMNd9wE/TihKsTJHTJi3rJsSGL92b4L8e27c=; 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=kYEJYiPV0LrBwqVbDBfVhGkaJ7YItSp+OxGvO9rOJMv2xY3pGhBP4OkF8FUZW/Dp5 y2xzPvZGAKlNLTILFlJ5oEd3MveE0TiRKtqTd/DrC/k47g/JI0EAzHThFxcvMg5VC0 UJA1WgTytFnb71BLjDqS7TPpioa8W6hqVBG3W/4Q= 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 52F9A6B95F for ; Tue, 13 Apr 2021 16:28:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 52F9A6B95F Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lWJ5w-0000dj-IO; Tue, 13 Apr 2021 16:28:44 +0300 To: Sergey Ostanevich , Igor Munkin Date: Tue, 13 Apr 2021 16:27:14 +0300 Message-Id: <1acbd7eb0fc9fb8a4b805a3fbf214de8e8e43ecf.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: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480257C85EA0BB7A95D0F00AE41BB9A5343182A05F538085040CB5305D9747401D032E093C01949EF2A7739298F886030B5F414027C837A7EB1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7FBB2043146276655EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374E88016F1B7D8D248638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B28E0822766B223A36BA7D243C864259834AEA611A897B002DD2E47CDBA5A96583C09775C1D3CA48CFA333A05395E4745B117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE77E7E81EEA8A9722B8941B15DA834481F9449624AB7ADAF372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F4AF35CDC743633045E1C53F199C2BB95B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CB69F9342289A40B32D0685BAA42BD08A0EBF76BC25E3993E9C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF0417BEADF48D1460699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A63B03BCD35E0C0A7967748DBDBBEE04020ADD23BC9348D882C3CBE40BB363B563B96EC651DE7CB41D7E09C32AA3244C0AC602237A34EE29B67C0F144B2DCAEF64EE5813BBCA3A9D927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojnA7/qPBUIXFbuZnerCS8rA== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4DDC5B13B48B4FCE20CB0C4669B49AB2C87D464BA66DF90A0F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit v3 14/29] test: adapt PUC-Rio test with activeline check 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 the 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 the function from the check, considering LuaJIT's behaviour. Resolves tarantool/tarantool#5708 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 --- test/PUC-Rio-Lua-5.1-tests/db.lua | 10 +++++++++- 1 file changed, 9 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 f81b86cf..9ad58264 100644 --- a/test/PUC-Rio-Lua-5.1-tests/db.lua +++ b/test/PUC-Rio-Lua-5.1-tests/db.lua @@ -495,7 +495,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: LuaJIT does not report the 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. +-- 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