Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 luajit 0/5] Adapt lua-Harness test suite
Date: Wed, 17 Mar 2021 03:46:24 +0300	[thread overview]
Message-ID: <20210317004624.GR9042@tarantool.org> (raw)
In-Reply-To: <cover.1615819534.git.skaplun@tarantool.org>

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.

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

================================================================================

diff --git a/cmake/luajit.cmake b/cmake/luajit.cmake
index 1c05e085b..3d37164e8 100644
--- a/cmake/luajit.cmake
+++ b/cmake/luajit.cmake
@@ -40,16 +40,19 @@ set(LUAJIT_TEST_BINARY $<TARGET_FILE:tarantool> CACHE STRING
 set(LUAJIT_USE_TEST OFF CACHE BOOL
     "Generate <test> target" FORCE)
 
-# Enable internal LuaJIT assertions for Tarantool Debug build.
 # XXX: There is <strict> module enabled by default in Tarantool
 # built in Debug, so we need to tweak LuaJIT testing environment.
+# XXX: Also, this script "unloads" internal Tarantool's modules
+# and remove globals conflicting with LuaJIT test suites.
+set(LUAJIT_TEST_INIT "${PROJECT_SOURCE_DIR}/test/luajit-test-init.lua"
+    CACHE STRING "Lua code need to be run before tests are started" FORCE)
+
+# Enable internal LuaJIT assertions for Tarantool Debug build.
 if(CMAKE_BUILD_TYPE STREQUAL "Debug")
     set(LUAJIT_USE_APICHECK ON CACHE BOOL
         "Assertions for the Lua/C API" FORCE)
     set(LUAJIT_USE_ASSERT ON CACHE BOOL
         "Assertions for the whole LuaJIT VM" FORCE)
-    set(LUAJIT_TEST_INIT "${PROJECT_SOURCE_DIR}/test/luajit-test-init.lua"
-        CACHE STRING "Lua code need to be run before tests are started" FORCE)
 endif()
 
 # Valgrind can be used only with the system allocator. For more
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.

+-- 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.

# 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.

================================================================================

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

  parent reply	other threads:[~2021-03-17  0:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 15:29 Sergey Kaplun via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 1/5] test: add " Sergey Kaplun via Tarantool-patches
2021-03-15 17:37   ` Igor Munkin via Tarantool-patches
2021-03-15 18:10     ` Sergey Kaplun via Tarantool-patches
2021-03-15 21:06       ` Igor Munkin via Tarantool-patches
2021-03-16  9:38         ` Sergey Kaplun via Tarantool-patches
2021-03-16 11:08           ` Igor Munkin via Tarantool-patches
2021-03-16 12:02             ` Sergey Kaplun via Tarantool-patches
2021-03-16 13:50               ` Sergey Ostanevich via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 2/5] test: adjust lua-Harness suite for LuaJIT Sergey Kaplun via Tarantool-patches
2021-03-15 17:39   ` Igor Munkin via Tarantool-patches
2021-03-15 18:33     ` Sergey Kaplun via Tarantool-patches
2021-03-15 21:27       ` Igor Munkin via Tarantool-patches
2021-03-16 14:25         ` Sergey Ostanevich via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 3/5] test: adjust lua-Harness test suite for Tarantool Sergey Kaplun via Tarantool-patches
2021-03-15 17:44   ` Igor Munkin via Tarantool-patches
2021-03-16  6:01     ` Sergey Kaplun via Tarantool-patches
2021-03-16 10:51       ` Igor Munkin via Tarantool-patches
2021-03-16 14:51         ` Sergey Ostanevich via Tarantool-patches
2021-03-16 14:59         ` Sergey Kaplun via Tarantool-patches
2021-03-15 19:12   ` Igor Munkin via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 4/5] test: disable 241-standalone of lua-Harness suite Sergey Kaplun via Tarantool-patches
2021-03-16 14:51   ` Sergey Ostanevich via Tarantool-patches
2021-03-15 15:29 ` [Tarantool-patches] [PATCH v2 luajit 5/5] test: disable 411-luajit " Sergey Kaplun via Tarantool-patches
2021-03-16 14:52   ` Sergey Ostanevich via Tarantool-patches
2021-03-17  0:46 ` Igor Munkin via Tarantool-patches [this message]
2021-03-17  7:32   ` [Tarantool-patches] [PATCH v2 luajit 0/5] Adapt lua-Harness test suite Sergey Kaplun via Tarantool-patches
2021-03-17 10:27     ` Igor Munkin via Tarantool-patches
2021-03-17 10:31       ` Sergey Kaplun via Tarantool-patches
2021-03-17 16:49 ` 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=20210317004624.GR9042@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 luajit 0/5] Adapt lua-Harness test suite' \
    /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