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 A189B9B51DC; Sun, 25 Feb 2024 22:40:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A189B9B51DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1708890051; bh=+djDqupdp+ZFO0C1bfDaJeSsW1CYlJtWSWQlKZVbPSY=; 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=D/q/BUEkbiF70m7xdZJMWdHQtMK5/QcLyGkma8C+NwNmz2YN+WIBbruIerU78/hR+ 8objOeTmpyRegPN6qQYAnqUrvp11suXe14pEJEDN78pIodNo2h4bwvteGBDW6MgpEX 1BlAQrd8ul+dP9sP10RSML4kQR2ixmUzrBTubsnU= Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [95.163.41.91]) (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 9901C9B51DF for ; Sun, 25 Feb 2024 22:40:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9901C9B51DF Received: by smtp49.i.mail.ru with esmtpa (envelope-from ) id 1reKMj-0000000DOO1-3Tnx; Sun, 25 Feb 2024 22:40:50 +0300 Date: Sun, 25 Feb 2024 19:27:52 +0000 To: Maxim Kokryashkin Message-ID: References: <24af2ffde3f76e954582ae298a6ed5b5262d74d5.1708856482.git.imun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD90B4B6FE9E606E496C65EA655E51029FF73D1A064B28042F300894C459B0CD1B92A87DECA942405FB83B016886A0292C8E652EE8C7B1B31F86EEFFD2DE9C0EECA768ACFD3FE3A7A49 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A3DED2DACB82E709C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE71D6E7AC8529A326CEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B73AB1701401CD8718A62527238A60190860403764E0F5213134861355CB0D7F5A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7ABB305BD10C6E5099FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C37EF884183F8E4D67117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CFD0953842B444AAC376E601842F6C81A12EF20D2F80756B5FB606B96278B59C4276E601842F6C81A127C277FBC8AE2E8BE287FC2BA681BAD5D81D268191BDAD3D3666184CF4C3C14F3FC91FA280E0CE3D1A620F70A64A45A98AA50765F7900637F9425D8FA97DB4396D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F790063772BA5C7373F6D986EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5AA97519998FDA5B25002B1117B3ED696E175231BDCE3B5B84A0A47EBA01A636A823CB91A9FED034534781492E4B8EEAD9DB614F8F96CFA30BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF902B841C0A8DBE1DAF89664211138325BD028B2706F70D02C3CF11A76DD66EF62219C82DFA2AC3F2A653534C7294CACC9DFB79D7D26A7277A9AA2A053A27D88F815F18D594AEAA565F4332CA8FE04980913E6812662D5F2A74A26541E23E71317A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojhcsd5OwWmoiJ9lgN+xCZIw== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D5313725BDEA3130842F0841F56765D88C4084881E54B2EAB8DF819B433AF1690818F5EE5212A79745119D086FC03DADA47A24EDF3BD9585A06DEEABBE9EE6587A054198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/2] test: introduce routine to build error message 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Max, Thanks for your review! I've fixed all the nits you've left, the branch is force-pushed. On 25.02.24, Maxim Kokryashkin wrote: > Hi, Igor! > Thanks for the patch! > LGTM, except for a few comments below. > > On Sun, Feb 25, 2024 at 10:41:06AM +0000, Igor Munkin wrote: > > LuaJIT modules yields the plain errors, but LuaJIT binary adds 'luajit:' > Typo: s/yields/yield/ Fixed, thanks! > > prefix to it, so 411-luajit.t test in lua-Harness suite expects the > > error message with the aforementioned prefix in the corresponding > > assertions. At the same time, Tarantool prepends nothing to the error > Typo: s/prepends/adds/ > Or, alternatively, you can say: > | Tarantool doesn't prepend errors produced by the LuaJIT module with > | anything. Thanks, chose yours wording. > > produced by LuaJIT module. > Typo: s/LuaJIT/the LuaJIT/ Fixed by your wording. > > > > To tweak the pattern to be used within the 411-luajit.t chunk, the > > auxiliary error building function is introduced in this patch. > > > > Signed-off-by: Igor Munkin > > --- > > test/lua-Harness-tests/411-luajit.t | 17 +++++++++++++---- > > 1 file changed, 13 insertions(+), 4 deletions(-) > > > > diff --git a/test/lua-Harness-tests/411-luajit.t b/test/lua-Harness-tests/411-luajit.t > > index 6cfd6837..1b2da729 100755 > > --- a/test/lua-Harness-tests/411-luajit.t > > +++ b/test/lua-Harness-tests/411-luajit.t > > @@ -31,6 +31,15 @@ if not jit or ujit or _TARANTOOL then > > skip_all("only with LuaJIT") > > end > > > > +-- XXX: Unfortunately, Lua patterns do not support optional > > +-- capture groups, so the helper below implements poor man's > > +-- optional capture groups for the patters matching LuaJIT CLI > Typo: s/patters/patterns/ Fixed, thanks! > > +-- error messages. > > +local function errbuild(message) > > + local eprefix = _TARANTOOL and "" or "[^:]+: " > IMO, `errprefix` or `err_prefix` would be better. > Feel free to ignore, though. No problem, fixed. The diff is below: ================================================================================ diff --git a/test/lua-Harness-tests/411-luajit.t b/test/lua-Harness-tests/411-luajit.t index 414e6a57..40241db3 100755 --- a/test/lua-Harness-tests/411-luajit.t +++ b/test/lua-Harness-tests/411-luajit.t @@ -36,8 +36,8 @@ end -- optional capture groups for the patters matching LuaJIT CLI -- error messages. local function errbuild(message) - local eprefix = _TARANTOOL and "" or "[^:]+: " - return table.concat({"^", eprefix, message}) + local errprefix = _TARANTOOL and "" or "[^:]+: " + return table.concat({"^", errprefix, message}) end local lua = _retrieve_progname() ================================================================================ > > + return table.concat({"^", eprefix, message}) > > +end > > + > > local lua = _retrieve_progname() > > > > if not pcall(io.popen, lua .. [[ -e "a=1"]]) then > > -- > > 2.39.2 > > -- Best regards, IM