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 BCD58A03EE7; Mon, 8 Apr 2024 10:51:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BCD58A03EE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1712562663; bh=VeBUUqR6qRL9c7mWL48sARL4OtmRZp85PkTsyI0W+FY=; 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=ti7W2iQc2cUm1EQ1un+0YcIEWmcOcBCMFh6EwxlN2T2H8C3nTyUBBPD6sQ+6+cvvU p+LHWJepI26iZJf+mqmbIINCrycyVHcDrBMC27b8/uOfSf4f22rW81LNBPLwWaBxzs phbje5oIHY2d/crsV5qPwYfDILGerVf+jU7eVqYk= Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [95.163.41.92]) (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 8388BA03EE7 for ; Mon, 8 Apr 2024 10:51:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8388BA03EE7 Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1rtjmO-00000004W60-3kTi; Mon, 08 Apr 2024 10:51:01 +0300 Date: Mon, 8 Apr 2024 10:47:00 +0300 To: Sergey Bronnikov Message-ID: References: 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: 4F1203BC0FB41BD9517FD34F787F379111906F9EA669DE2E19486B133358DDCC182A05F538085040DF68B8E6CFB84395D4FF92D56319F197F7A8A7FC0E456C459DF30CCB6372017A64783DCF1A4C2DEE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73B44982FA5E78411EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A005C90FB6EB35FF8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D80309A554342E6AE50788BE954F7B08B23685BBD0FDF8BC7FCC7F00164DA146DAFE8445B8C89999728AA50765F7900637BA939FD1B3BAB99B389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8D2DCF9CF1F528DBCF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CAD74539164518AE5BA3038C0950A5D36C8A9BA7A39EFB766D91E3A1F190DE8FDBA3038C0950A5D36D5E8D9A59859A8B6389ED70FDB73D44F3AA81AA40904B5D99C9F4D5AE37F343AD1F44FA8B9022EA23BBE47FD9DD3FB595F5C1EE8F4F765FCF1175FABE1C0F9B6E2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B851EDB9C5A93305EEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5B54E35B1271632B85002B1117B3ED6966C244D21D27221B1B2920F75BA9A967F823CB91A9FED034534781492E4B8EEADED8273DE7764599ABDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFE9C6B170D0F97A632B4E053EDEF8223398415E0C3A6270C8C57FA68FA9C56FB5136FDBFCF0F914391CFDFDFCAF5E4A4BBC4D022B118B36EA364596011B24F99804A40B2096519CF1C226CC413062362A913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojabKNeIbMV3uccDPqT1q+Rg== X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B5923258D3356DA74A6D4FF92D56319F197F7A8A7FC0E456C45B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 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 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" 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 > --- > .../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. > 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/ > +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 =================================================================== -- Best regards, Sergey Kaplun