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 1F767A073C1; Mon, 8 Apr 2024 12:33:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1F767A073C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1712568810; bh=osQPecjEGYWL/8F85OcI/LJXjx3gD45QOpRR+esrDwU=; 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=bk7L+IcXvs5RT+GqE0XPZgIyRQ3TweBOj9xaDEpUOY91uzBzZjZ/ATds7kau341IG MLHqcsAFO5853wWZCbLMMuVL2ARPV/jGRumIzn4aPza8GvlyB+z09xCMr+6l3pY3p3 zM/yOhV+jIOdS3wSpwDnzb1uQkdlAnfHYAbIcYHk= Received: from smtp16.i.mail.ru (smtp16.i.mail.ru [95.163.41.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 90E9DA073C1 for ; Mon, 8 Apr 2024 12:33:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 90E9DA073C1 Received: by smtp16.i.mail.ru with esmtpa (envelope-from ) id 1rtlNX-0000000A8JQ-3WzQ; Mon, 08 Apr 2024 12:33:28 +0300 Date: Mon, 8 Apr 2024 12:33:26 +0300 To: Sergey Bronnikov Message-ID: References: <20240326160940.339283-1-m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9517FD34F787F3791A3F2ACD2F0918839CD1C77B1EDC09200182A05F538085040DEA999B6B893B572C591814E25D11F9F4B5BE320B9D3C9B53A0ABD99C2C7E30D74892205136C5E50 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73B44982FA5E78411EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371AA4FDB8B3812E678638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8A972F3122926FD39B2FE0746FF6423A293051BDFA29AF967CC7F00164DA146DAFE8445B8C89999728AA50765F7900637028599BB38096F4F389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC80CABCCA60F52D7EBF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C4E7D9683544204AF6136E347CC761E074AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C3BFFF513DCDB8CC61BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE778B471BB9634AD8A731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5C19F3044EB88D8A35002B1117B3ED6964583F25E03DF6FF1B74D9144D44E4FCF823CB91A9FED034534781492E4B8EEADA91A6E18C88C5E2F X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF8FAA42D39EA7CBBA404BC426D81717CEFB24CB39FCA123E6382CADE885A749BEA53151558601347D1CFDFDFCAF5E4A4B383386820848177764FD95EC024E26451EFE0FA5C0766E98C226CC413062362A913E6812662D5F2A54F6898A6FDCBDC72A617DFBE5FEC2C6383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojabKNeIbMV3s9ABUFWyS5Jg== X-Mailru-Sender: 7940E2A4EB16C9976F80DCDCD59EC227B6B7F24E1840E2B8C591814E25D11F9F4B5BE320B9D3C9B5E2527C969975515CFF9FCECFB8D89CB6C77752E0C033A69E235A20A81F3B0E39AB3C5F247CB2F7F93A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v1] profilers: print user-friendly errors 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Cc: Maxim Kokryashkin , tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the review! Fixed your comments, branch is rebased and force-pushed. Here is the diff with fixes: === diff --git a/test/tarantool-tests/gh-9217-profile-parsers-error-handling.test.lua b/test/tarantool-tests/gh-9217-profile-parsers-error-handling.test.lua index c2e0f0a6..0b7ee2dd 100644 --- a/test/tarantool-tests/gh-9217-profile-parsers-error-handling.test.lua +++ b/test/tarantool-tests/gh-9217-profile-parsers-error-handling.test.lua @@ -16,7 +16,7 @@ local utils = require('utils') local BAD_PATH = utils.tools.profilename('bad-path-tmp.bin') local NON_PROFILE_DATA = utils.tools.profilename('not-profile-data.tmp.bin') -local CORRUPT_PROFILE = utils.tools.profilename('profdata.tmp.bin') +local CORRUPT_PROFILE_DATA = utils.tools.profilename('profdata.tmp.bin') local EXECUTABLE = utils.exec.luacmd(arg) local PARSERS = { @@ -37,7 +37,7 @@ local TEST_CASES = { err_msg = 'Failed to parse symtab from' }, { - path = CORRUPT_PROFILE, + path = CORRUPT_PROFILE_DATA, err_msg = 'Failed to parse profile data from' }, } @@ -50,7 +50,7 @@ local function generate_non_profile_data(path) file:close() end -local function generate_corrupt_profile(path) +local function generate_corrupt_profile_data(path) local res, err = misc.memprof.start(path) -- Should start successfully. assert(res, err) @@ -74,7 +74,7 @@ local function generate_corrupt_profile(path) end generate_non_profile_data(NON_PROFILE_DATA) -generate_corrupt_profile(CORRUPT_PROFILE) +generate_corrupt_profile_data(CORRUPT_PROFILE_DATA) for _, case in ipairs(TEST_CASES) do for profiler, parser in pairs(PARSERS) do @@ -86,5 +86,5 @@ for _, case in ipairs(TEST_CASES) do end os.remove(NON_PROFILE_DATA) -os.remove(CORRUPT_PROFILE) +os.remove(CORRUPT_PROFILE_DATA) test:done(true) diff --git a/tools/utils/symtab.lua b/tools/utils/symtab.lua index e80b9f33..f00d6bc0 100644 --- a/tools/utils/symtab.lua +++ b/tools/utils/symtab.lua @@ -100,8 +100,8 @@ function M.parse(reader) if string.byte(version) ~= LJS_CURRENT_VERSION then error(string_format( - "LuaJIT symbol table format version mismatch:".. - " the tool expects %d, but your data is %d", + "LuaJIT symbol table format version mismatch: ".. + "the tool expects %d, but your data is %d", LJS_CURRENT_VERSION, string.byte(version) )) ===