[Tarantool-patches] [PATCH luajit v1 3/5] test: allow `jit.parse` to return aborted traces

Sergey Kaplun skaplun at tarantool.org
Mon May 13 14:53:44 MSK 2024


Hi, Maxim!
Thanks for the review!
Added a comment as you suggested and force-pushed the branch.

On 05.05.24, Maxim Kokryashkin wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM, except for a single nit below.
> On Mon, Apr 22, 2024 at 11:49:56AM UTC, Sergey Kaplun wrote:

<snipped>

> > @@ -87,9 +88,17 @@ local header_handlers = {
> >      ctx.parsing_trace = nil
> >      ctx.parsing = nil
> >    end,
> > -  abort = function(ctx, trace_num)
> > +  abort = function(ctx, trace_num, line)
> >      local traces = ctx.traces
> >      assert(ctx.parsing_trace == trace_num)
> > +
> > +    local aborted_traces = ctx.aborted_traces
> > +    if not aborted_traces[trace_num] then
> > +      aborted_traces[trace_num] = {}
> > +    end
> > +    traces[trace_num].abort_reason = line:match('-- (.+)$')
> Please drop a comment explaining the regexp.

Added:

===================================================================
diff --git a/test/tarantool-tests/utils/jit/parse.lua b/test/tarantool-tests/utils/jit/parse.lua
index 0ce7f7c8..f853437d 100644
--- a/test/tarantool-tests/utils/jit/parse.lua
+++ b/test/tarantool-tests/utils/jit/parse.lua
@@ -96,6 +96,8 @@ local header_handlers = {
     if not aborted_traces[trace_num] then
       aborted_traces[trace_num] = {}
     end
+    -- The reason is mentioned after "-- " at the end of the
+    -- string.
     traces[trace_num].abort_reason = line:match('-- (.+)$')
     table.insert(aborted_traces[trace_num], traces[trace_num])
 
===================================================================

> > +    table.insert(aborted_traces[trace_num], traces[trace_num])
> > +

<snipped>

> >

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list