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 7C68B6EC55; Fri, 11 Jun 2021 10:49:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7C68B6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623397741; bh=98/ZHb+rFWrUeYTlEYedaJVEAWRJd6ps3etbjuPN/nU=; 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=Foyh+4/7gaVuxhju4A3fjOVcApJptB6PWP25ooQgX/YLpOCktz/AUcKsmqVijgtMg 5ldcgLXHhu2kba6983RSEP+jntQt6Vafug3w5+rKmvfXbHWGZRNAXOypON7e+7pMLI yGawtIVasIkBfIHvrq6FnEM6fbQ/D5kLfSYkZrM8= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (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 A6FFA6EC56 for ; Fri, 11 Jun 2021 10:48:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A6FFA6EC56 Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1lrbtz-0001PD-Sb; Fri, 11 Jun 2021 10:48:28 +0300 To: alexander.turenko@tarantool.org Date: Fri, 11 Jun 2021 10:48:11 +0300 Message-Id: X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C544BBC2A69B1B4100B389BF69B7A224D7C182A05F53808504087D1AB2A3B10B02E5224611F96AD66E22E3EFF4D5272EA10F973BAAD6F219A70 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75210414551E8CD62EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F757A79C3007ACA28638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8C272FD6F97B3EA24561ECBDFC5F08025117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FCD0B7CED207D22A7C3AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F790063785392CCC7BAD1536D81D268191BDAD3D698AB9A7B718F8C4D1B931868CE1C5781A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F83C798A30B85E16B5E1C53F199C2BB95B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C8874A2D3FA5089FE439382DEB1B618FB53951D35F908AFA49C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF31C0090ACECF247D699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343DCFC3BEDFB0242D69CED051666C665D27C09C488139E2C0B27AF5543F1E5D9D36E138EA5B286D391D7E09C32AA3244C57D0E4BBBA25019A8570F44073C58B265A1673A01BA68E40FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojCpYK6nkTlbG970waKQ7iIw== X-Mailru-Sender: 6CA451E36783D721CBEA96CEA26D325D5B83CF6CCDECB754DAC69640794C8A0EB7CBEF92542CD7C82F97C478340294DCC77752E0C033A69E0F0C7111264B8915FF1320A92A5534336C18EFA0BB12DBB0 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 1/3] test: corrected reported error lines 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: Timur Safin via Tarantool-patches Reply-To: Timur Safin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" It always was a problem that reported source line was not pointing to the actual callee line number, but rather to the start of file, i.e. we have seen: ``` [001] sql-tap/tkt-9a8b09f8e6.test.lua memtx [001] not ok 22 - 4.3 # [001] Traceback: [001] [Lua ] function 'do_catchsql_test' at [001] [main] at [001] [001] not ok 23 - 4.4 # [001] Traceback: [001] [Lua ] function 'do_catchsql_test' at [001] [main] at ``` (see the :0 part) Instead of correct line numbers: ``` [001] sql-tap/tkt-9a8b09f8e6.test.lua memtx [001] not ok 22 - 4.3 # [001] Traceback: [001] [Lua ] function 'do_catchsql_test' at [001] [main] at [001] [001] not ok 23 - 4.4 # [001] Traceback: [001] [Lua ] function 'do_catchsql_test' at [001] [main] at ``` The problem was due to `.linedefined` used, instead of source line in `.currentline`. Closes #6134 --- src/lua/tap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/tap.lua b/src/lua/tap.lua index 346724d84..77fd8d096 100644 --- a/src/lua/tap.lua +++ b/src/lua/tap.lua @@ -23,7 +23,7 @@ local function traceback(level) local frame = { source = info.source; src = info.short_src; - line = info.linedefined or 0; + line = info.currentline or info.linedefined or 0; what = info.what; name = info.name; namewhat = info.namewhat; -- 2.29.2