[Tarantool-patches] [PATCH v2 luajit 0/5] Adapt lua-Harness test suite

Sergey Kaplun skaplun at tarantool.org
Wed Mar 17 10:32:41 MSK 2021


Igor,

Thanks for the review!

On 17.03.21, Igor Munkin wrote:
> Sergey,
> 
> Thanks for the series! I've looked onto the updated version on your
> branch and it is almost cool! I've polished it a bit: commit message,
> typos, etc -- you can see the changes on my branch[1] (CI is green[2]).
> If you're OK with them, I'll push the changeset to the trunk.

LGTM.
What's about Sergos'es naming proposal here [1]?

> 
> Speaking about the changes in Tarantool, I almost OK with them except
> the test/luajit-test-init.lua. Consider the comments below.

Sorry, I don't get how exactly to consider them, so I answer your
questions here. If it necessary I'll push them to the branch (yours or
mine).

> 
> ================================================================================
> 
> diff --git a/cmake/luajit.cmake b/cmake/luajit.cmake
> index 1c05e085b..3d37164e8 100644
> --- a/cmake/luajit.cmake
> +++ b/cmake/luajit.cmake

<snipped>

> diff --git a/test/luajit-test-init.lua b/test/luajit-test-init.lua
> index bc4af9748..d3f637156 100644
> --- a/test/luajit-test-init.lua
> +++ b/test/luajit-test-init.lua
> @@ -1,2 +1,16 @@
>  -- Disable strict for Tarantool.
>  require("strict").off()
> +
> +-- XXX: lua-Harness test suite uses it's own tap.lua module
> +-- that conflicts with the Tarantool's one.
> +package.loaded.tap = nil
> +-- XXX: lua-Harness test suite checks that utf8 module presents
> +-- only in Lua5.3 or moonjit.
> +utf8 = nil
> +
> +-- Add `strict.off()` to `progname` command, that runs child tests
> 
> # If only strict.off is required for child processes, please mention why
> # others are not.

Other changes are required only for parent process, looks obviously
as far as they are not added.

> 
> +-- in some LuaJIT test suites to disable strict there too.
> +-- Quotes type is important.
> +-- XXX: luacheck thinks that `arg` is read-only global variable.
> +-- luacheck: no global
> +arg[-1] = arg[-1]..' -e "require[[strict]].off()"'
> 
> # Please, mention how Tarantool parses CLI arguments and why arg[-1]
> # contains the binary name despite the given flags.

Tarantool stores the script name at index 0 in arg variable and
interpreter name at index -1, ignoring other CLI arguments between them.

> 
> # Furthermore, you can get the file path via `debug.getinfo(1).source`,
> # so you can reassemble LUAJIT_TEST_COMMAND. However, if this is
> # unnecessary, then nevermind.

Looks unnecessary and not such easy to configure, ignoring for now.

> 
> ================================================================================
> 
> On 15.03.21, Sergey Kaplun wrote:
> > In this patchset lua-Harness test suite is adapted for the LuaJIT fork
> > and Tarantool.
> > 
> > Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-5844-adapt-lua-harness-test-suite
> > Tarantool's branch for tests:
> > https://github.com/tarantool/tarantool/tree/skaplun/gh-5844-adapt-lua-harness-test-suite
> > Issues:
> > * https://github.com/tarantool/tarantool/issues/5844
> > * https://github.com/tarantool/tarantool/issues/5473
> > 
> > Changes in v2:
> > * glanced commit message for the first patch
> > * dropped module renaming
> > * separate suite introduction and adjustment
> > * dropped unnecessary commits with disabled tests
> > 
> > Mergen Imeev (1):
> >   test: add lua-Harness test suite
> > 
> > Sergey Kaplun (4):
> >   test: adjust lua-Harness suite for LuaJIT
> >   test: adjust lua-Harness test suite for Tarantool
> >   test: disable 241-standalone of lua-Harness suite
> >   test: disable 411-luajit of lua-Harness suite
> > 
> 
> <snipped>
> 
> > 
> > -- 
> > 2.28.0
> 
> [1]: https://github.com/tarantool/luajit/tree/imun/gh-5844-adapt-lua-harness-test-suite
> [2]: https://github.com/tarantool/tarantool/tree/imun/gh-5844-adapt-lua-harness-test-suite
> 
> > 
> 
> -- 
> Best regards,
> IM

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2021-March/022733.html

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list