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 9529FA0A981; Mon, 8 Apr 2024 16:10:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9529FA0A981 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1712581816; bh=UMBhe73OIi4e0on5gCfvrgCXet0NXGpV3vDyp5CArEM=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FBojm/CoTMGMruhYJt0yQz2Ij+tuERHW6p0yZpi1bRnSKCWw3jIeDrUPe+J5XidDs Wb0Q3vnOuV7AWmA2Ak09lLowC4/z8ISVZ7lNCAemCHp6vydBFNbZU3GrI+rpGaPCHI QOlsiXAsQnStvng17rT9zEFuTeopog7Mq/PXKzZ8= Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [95.163.41.75]) (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 7608BA0A980 for ; Mon, 8 Apr 2024 16:10:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7608BA0A980 Received: by smtp34.i.mail.ru with esmtpa (envelope-from ) id 1rtolK-0000000GFxY-1ykG; Mon, 08 Apr 2024 16:10:14 +0300 Date: Mon, 8 Apr 2024 16:06:13 +0300 To: Sergey Bronnikov , tarantool-patches@dev.tarantool.org 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: 4F1203BC0FB41BD9D327C87852EB66D3EF14B4DA64C5A2F0D1685CB8F07D9C77182A05F5380850403488810B06354C2B479CDAE959BF6424F8A919D041581AF49D2AC98124BF8ED0679C55F6EEB1E644 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C6068CE86C2B75F5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006377845AD97F799C6E88638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8B2666B46774DC8C2F9290B3D910DD9B558238B838376F892CC7F00164DA146DAFE8445B8C89999728AA50765F7900637CAEE156C82D3D7D9389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8062BEEFFB5F8EA3EF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CF8BD4E506CFA3D88C0837EA9F3D197644AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C3D8561A2FEC730ACEBA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF17B107DEF921CE791DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3483320834B361D1F089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5ACA30DA523D0E9925002B1117B3ED6967398EF0DCA173FA6219207EC0A953D2C823CB91A9FED034534781492E4B8EEADB73CFAAED92B6E13BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF26CFBF21BD626300784769A56E6B8404C169D96D20DA97E3C048C15502BF3DB46E47D229C2E76ED41CFDFDFCAF5E4A4B536F4EC285D70A54C3DA333AAC6E18748C492315F3FC004E111DC66A97D0BFE2913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojabKNeIbMV3vU8Jw5ld0TAA== X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B590FB885A93C8E1168479CDAE959BF6424F8A919D041581AF4B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On 08.04.24, Sergey Kaplun via Tarantool-patches 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 > > > --- > > .../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/ Also, comment width is more than 66 symbols. > > > +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 -- Best regards, Sergey Kaplun