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 D75B7A69E67; Thu, 11 Apr 2024 11:08:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D75B7A69E67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1712822898; bh=f5/WPJw/thK1BxF26doY9v0xM/EOg/mXlEUcs+nC9x8=; 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=pwykeHHnoJQS4jVBkvlCom1+S2rSdulSU8sjFjlu3c8SUmdDVTt+1QvhgjPyvHqIQ 9GIXdNz2GDjTw0dyZn9Ij5PD3/dgDu+LSjiH+VfmSz3kDJay7nMvb4+6IynR/m0V6t Sy3A0kwemm4zlDoupMD6LyzzkIqVYtjVwf5NJaOE= Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [95.163.41.85]) (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 9F0B7A69E54 for ; Thu, 11 Apr 2024 11:08:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9F0B7A69E54 Received: by smtp47.i.mail.ru with esmtpa (envelope-from ) id 1rupTi-00000006P60-3saN; Thu, 11 Apr 2024 11:08:15 +0300 Message-ID: <6492e6d3-f18b-411f-b1ab-ba4a16d1b0a0@tarantool.org> Date: Thu, 11 Apr 2024 11:08:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Sergey Kaplun , Sergey Bronnikov References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D327C87852EB66D37A377202123D15E2FF4702E432B109B7182A05F5380850404E54B1BDF19D13BC2EB5D77EF37489D16667588B16C2C8CB042DD2D49A1D27C870620434C0A4BCCF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70043D879A87EF1BCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AA32F0A5ADCF96E68638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D830F2831886DE804FD7D79A499090AD6F22A243F40C8FCA62CC7F00164DA146DAFE8445B8C89999728AA50765F7900637D0FEED2715E18529389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC81D471462564A2E19F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C4CB6874B0BCFF0B8040F9FF01DFDA4A84AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C399A4CE869139A209BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166176DF2183F8FC7C04E672349037D5FA5725E5C173C3A84C3DB8B71E42BA00C4F35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5B2F054EEF9199F885002B1117B3ED69636DBBB65EB2080D069995D676B7B4CBE823CB91A9FED034534781492E4B8EEADA3A806F356AF31D6 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF7562EE50E5B412A0D10A9030424AA793E0A7CC95B447AAEFE0CD884CE0DEEBD8BF7F25536427AFA143A9A4803F78FBB9BD11999282CD1C45A2D405FE6831736984E51557C3E2D724C226CC413062362A913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioja81YqLNwFpkPtc+KqzHeDA== X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B590E31CACDF853BBC22EB5D77EF37489D16667588B16C2C8CBB7CBEF92542CD7C8795FA72BAB74744FC77752E0C033A69EA16A481184E8BB1C9B38E6EA4F046BE03A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 0/2] Mach-O generation fixes 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, On 08.04.2024 10:47, Sergey Kaplun wrote: > Hi, Sergey! > Thanks for the patch set! > > I'll proceed with the review according version on the branch: > > =================================================================== >> Subject: [PATCH 1/3] test: introduce a helper read_file > This patch LGTM, after fixing several nits below. > >> The test `lj-366-strtab-correct-size.test.lua` has a test helper >> `read_file` that reads a file's content and returns it. >> This helper will be useful for a test upcoming in the next commit, >> so it is moved to test tools. > So, missed the ticket mentioning: > | Needed for tarantool/tarantool#9595 It is actually not needed for 9595. > >> --- >> .../lj-366-strtab-correct-size.test.lua | 10 +--------- >> test/tarantool-tests/utils/tools.lua | 8 ++++++++ >> 2 files changed, 9 insertions(+), 9 deletions(-) >> >> diff --git a/test/tarantool-tests/lj-366-strtab-correct-size.test.lua b/test/tarantool-tests/lj-366-strtab-correct-size.test.lua >> index 8a97a441..0bb92da6 100644 >> --- a/test/tarantool-tests/lj-366-strtab-correct-size.test.lua >> +++ b/test/tarantool-tests/lj-366-strtab-correct-size.test.lua >> @@ -138,14 +138,6 @@ local function create_obj_file(name) >> return elf_filename >> end >> >> --- Reads a file located in a specified path and returns its content. >> -local function read_file(path) >> - local file = assert(io.open(path), 'cannot open an object file') >> - local content = file:read('*a') >> - file:close() >> - return content >> -end >> - >> -- Parses a buffer in an ELF format and returns an offset and a size of strtab >> -- and symtab sections. >> local function read_elf(elf_content) >> @@ -172,7 +164,7 @@ end >> test:plan(3) >> >> local elf_filename = create_obj_file(MODULE_NAME) >> -local elf_content = read_file(elf_filename) >> +local elf_content = require('utils').tools.read_file(elf_filename) > Minor: I suggest avoiding the change at this line. > According to codestyle in other tests, we require helpers separately, > even if they are used only once. Where can I read a codestyle guide which you want to follow? > >> assert(#elf_content ~= 0, 'cannot read an object file') >> >> local strtab, symtab = read_elf(elf_content) >> diff --git a/test/tarantool-tests/utils/tools.lua b/test/tarantool-tests/utils/tools.lua >> index f35c6922..26b8c08d 100644 >> --- a/test/tarantool-tests/utils/tools.lua >> +++ b/test/tarantool-tests/utils/tools.lua >> @@ -12,4 +12,12 @@ function M.profilename(name) >> return (arg[0]:gsub('^(.+)/([^/]+)%.test%.lua$', replacepattern)) >> end >> >> +-- Reads a file located in a specified path and returns its content. > Typo: s/in/at/ Everything fine from Quillbot point of view. > >> +function M.read_file(path) >> + local file = assert(io.open(path), 'cannot open an object file') >> + local content = file:read('*a') >> + file:close() >> + return content >> +end >> + >> return M >> -- >> 2.44.0 > =================================================================== >