From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 1/2] test: introduce routine to build error message
Date: Sun, 25 Feb 2024 19:27:52 +0000 [thread overview]
Message-ID: <ZduUuOBzG796eubI@tarantool.org> (raw)
In-Reply-To: <qg7ptyc2o7dwnyckg6zhtk6sj2arwxq4yacgus7hto7amivonk@phiyhiogmaef>
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 <imun@tarantool.org>
> > ---
> > 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
<snipped>
> > --
> > 2.39.2
> >
--
Best regards,
IM
next prev parent reply other threads:[~2024-02-25 19:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-25 10:41 [Tarantool-patches] [PATCH luajit 0/2] Enable CLI-related tests in lua-Harness Igor Munkin via Tarantool-patches
2024-02-25 10:41 ` [Tarantool-patches] [PATCH luajit 1/2] test: introduce routine to build error message Igor Munkin via Tarantool-patches
2024-02-25 11:37 ` Maxim Kokryashkin via Tarantool-patches
2024-02-25 19:27 ` Igor Munkin via Tarantool-patches [this message]
2024-02-25 10:41 ` [Tarantool-patches] [PATCH luajit 2/2] test: enable CLI-related lua-Harness tests back Igor Munkin via Tarantool-patches
2024-02-25 11:41 ` Maxim Kokryashkin via Tarantool-patches
2024-02-25 19:31 ` Igor Munkin via Tarantool-patches
2024-02-25 19:41 ` Igor Munkin via Tarantool-patches
2024-02-27 8:36 ` [Tarantool-patches] [PATCH luajit 0/2] Enable CLI-related tests in lua-Harness Sergey Kaplun via Tarantool-patches
2024-02-28 18:25 ` Sergey Kaplun via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZduUuOBzG796eubI@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=imun@tarantool.org \
--cc=m.kokryashkin@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit 1/2] test: introduce routine to build error message' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox