Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit v2 3/5] test: introduce test:done TAP helper
Date: Wed, 26 Jul 2023 13:43:16 +0300	[thread overview]
Message-ID: <ZMD4xMsAwS2KeNQT@root> (raw)
In-Reply-To: <c550621a4582f760925230b8ccabb1154b8ffff9.1689925402.git.imun@tarantool.org>

Hi, Igor!
Thanks for the patch!
LGTM, except a minor nits regarding the commit message.

On 21.07.23, Igor Munkin wrote:
> Before the patch all tests (except <lj-603-err-snap-restore.test.lua>)

Typo: s/Before the patch/Before the patch,/

> in tarantool-tests suite terminate their execution via <os.exit> with
> the status depending on the test results. However, the second argument
> of <os.exit> was omitted and Lua universe was not properly finalized as

Typo: s/omitted and/omitted, and/

> a result. This behaviour becomes a problem, when LuaJIT is build with

Typo: s/build/built/

> LUAJIT_USE_SYSMALLOC option and AddressSanitizer support enabled, since
> the sanitizer starts reporting false positive errors about the memory
> allocations without the corresponding memory releases. To resolve these
> errors, the second parameter to each <os.exit> call terminating the test
> has to be added.
> 
> To avoid loss of the aforementioned parameter in future, <test:done>

Typo: s/in future/in the future/

> helper has been added to the TAP module. Depending on the single
> parameter, the new helper either properly finalize the test being run,
> or simply checks all the test assertions and raises an error if any of
> them fail. The latter case is added especially to handle the specifics
> of <lj-603-err-snap-restore.test.lua> and still check that everything
> works fine.
> 
> Needed for tarantool/tarantool#5878
> 
> Signed-off-by: Igor Munkin <imun@tarantool.org>
> ---

<snipped>

> +local function done(test, exit)
> +  if exit then
> +    -- XXX: The second argument is required to properly close Lua
> +    -- universe (i.e. invoke <lua_close> before exiting).
> +    -- XXX: return is added explicitly to force CALLT emitting.

Side note: Is there a place, where it is important?

> +    return os.exit(test:check() and 0 or 1, true)
> +  else
> +    assert(test:check(), 'Test check failed')
> +  end
> +end

<snipped>

> -- 
> 2.30.2
> 

-- 
Best regards,
Sergey Kaplun

  parent reply	other threads:[~2023-07-26 10:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21  8:12 [Tarantool-patches] [PATCH luajit v2 0/5] Add ASan support in LuaJIT Igor Munkin via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 1/5] ci: clean up workflow for exotic builds Igor Munkin via Tarantool-patches
2023-07-24 10:36   ` Sergey Bronnikov via Tarantool-patches
2023-07-26  9:37   ` Sergey Kaplun via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 2/5] memprof: remove invalid assertions Igor Munkin via Tarantool-patches
2023-07-24 10:46   ` Sergey Bronnikov via Tarantool-patches
2023-07-26  9:41   ` Sergey Kaplun via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 3/5] test: introduce test:done TAP helper Igor Munkin via Tarantool-patches
2023-07-24 10:53   ` Sergey Bronnikov via Tarantool-patches
2023-07-26 10:43   ` Sergey Kaplun via Tarantool-patches [this message]
2023-07-26 12:42     ` Igor Munkin via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 4/5] build: introduce LUAJIT_USE_ASAN option Igor Munkin via Tarantool-patches
2023-07-24 11:41   ` Sergey Bronnikov via Tarantool-patches
2023-07-26 13:06     ` Igor Munkin via Tarantool-patches
2023-07-25 12:26   ` Sergey Bronnikov via Tarantool-patches
2023-07-26 12:54     ` Igor Munkin via Tarantool-patches
2023-07-27 11:06       ` Sergey Bronnikov via Tarantool-patches
2023-07-26 11:03   ` Sergey Kaplun via Tarantool-patches
2023-07-21  8:12 ` [Tarantool-patches] [PATCH luajit v2 5/5] ci: introduce testing workflow with sanitizers Igor Munkin via Tarantool-patches
2023-07-24 11:54   ` Sergey Bronnikov via Tarantool-patches
2023-07-26 14:53     ` Igor Munkin via Tarantool-patches
2023-07-27 11:13       ` Sergey Bronnikov via Tarantool-patches
2023-07-26 11:29   ` Sergey Kaplun via Tarantool-patches
2023-07-26 16:35     ` Igor Munkin via Tarantool-patches
2023-08-03  7:31 ` [Tarantool-patches] [PATCH luajit v2 0/5] Add ASan support in LuaJIT Igor Munkin 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=ZMD4xMsAwS2KeNQT@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit v2 3/5] test: introduce test:done TAP helper' \
    /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