From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 35D236EC56; Wed, 17 Mar 2021 13:28:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 35D236EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1615976881; bh=OA9oDqFSsdGKiD4oB7EjYUNKm53Hb76M+NAPcdSkbfM=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=U8cBKqM1fTWznGCP5FqPfiyKPbIGm0NgyMwLFcfK4Vb1wTXjUTG8g0Mdc4Ea6VgYY L/UTPcgY6ej6RgHqSQVYWHB1fyDNkDJpNHfdJM0tU/yud99396VpSAZ0GURpHUM1zp hkxkoWviKKQearONMiG6MpQg96RNKeGZnXkLQRls= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6662F6EC56 for ; Wed, 17 Mar 2021 13:27:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6662F6EC56 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lMTPB-0007QA-Ph; Wed, 17 Mar 2021 13:27:58 +0300 Date: Wed, 17 Mar 2021 13:27:50 +0300 To: Sergey Kaplun Message-ID: <20210317102750.GA29703@tarantool.org> References: <20210317004624.GR9042@tarantool.org> <20210317073241.GA28016@root> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210317073241.GA28016@root> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD96485A7A9FC13189387C0BEA1E3D4462C4B99C4D0C48865C5182A05F538085040713C8792495ADF220502EC7EF0B46262CD4AF28D82AE2ABB42BCB496F28F85CA X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A4C4638C9DDF45FCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375448D590B04CE87D8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CF89CA98302ED496F72D5D768B61D3EFD3A813E0B4D0B0F91A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE74A95F4E53E8DCE969FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E97D2AE7161E217F117882F4460429728AD0CFFFB425014E868A13BD56FB6657A7F4EDE966BC389F9E8FC8737B5C224902CFACCC19C6E7D3089D37D7C0E48F6CCF19DD082D7633A0E7DDDDC251EA7DABAAAE862A0553A39223F8577A6DFFEA7CE1AEB6AF2DA18B6243847C11F186F3C5E7DDDDC251EA7DABCC89B49CDF41148FA8EF81845B15A4842623479134186CDE6BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5D36C50430CFAFA8D1A7EE43BA94C016F46C560F3274D306CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A533D6DF7731C6648B57C5B6DCF5862152B7688F4F14D5A35D8FA3C1DD672BFF1533332F076065D41D7E09C32AA3244C7599AEC80B7460448A34A2441EE45458C86C126E7119A0FE927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojwV/GgY7Z4vXUE7xjsbbg/A== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822A0B591D335D867D904520EDC1CC91548A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 0/5] Adapt lua-Harness test suite X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, On 17.03.21, Sergey Kaplun wrote: > 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]? Discussed offline: Sergos is OK with the current solution. > > > > > 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). Good, thanks! Considering your answers, I've polished the commit in Tarantool repo. See the patch below: ================================================================================ >From 2fa0e10e45f799419c341befba745286273d0c08 Mon Sep 17 00:00:00 2001 Message-Id: <2fa0e10e45f799419c341befba745286273d0c08.1615976372.git.imun@tarantool.org> From: Sergey Kaplun Date: Thu, 11 Mar 2021 12:00:44 +0300 Subject: [PATCH] luajit: bump new version LuaJIT submodule is bumped to introduce the following changes: * test: disable 411-luajit of lua-Harness suite * test: disable 241-standalone of lua-Harness suite * test: set USERNAME env var for lua-Harness suite * test: adjust lua-Harness tests that use dofile * test: adjust lua-Harness suite to CMake machinery * test: add lua-Harness test suite Within this changeset lua-Harness suite[1] is added to Tarantool testing. Considering Tarantool specific changes in runtime the suite itself is adjusted in LuaJIT submodule. However, Tarantool provides and unconditionally loads TAP module conflicting with the one used in the new suite. Hence, the Tarantool built-in module is "unloaded" in test/luajit-test-init.lua. Furthermore, Tarantool provides UTF-8 support via another built-in module. Its interfaces differ from the ones implemented in Lua5.3 and moonjit. At the same time our LuaJIT fork provides no UTF-8 support, so lua-Harness UTF-8 detector is simply confused with non-nil utf8 global variable. As a result, utf8 is set to nil in test/luajit-test-init.lua. There are also some tests launching Lua interpreter, so strict need to be disabled for their child tests too. Hence `strict.off()` is added to `progname` (i.e. arg[-1] considering the way Tarantool parses its CLI arguments) command used in these tests. [1]: https://framagit.org/fperrad/lua-Harness/tree/a74be27/test_lua Closes #5844 Part of #4473 Reviewed-by: Sergey Ostanevich Reviewed-by: Igor Munkin --- cmake/luajit.cmake | 9 ++++++--- test/luajit-test-init.lua | 22 ++++++++++++++++++++++ third_party/luajit | 2 +- 3 files changed, 29 insertions(+), 4 deletions(-) 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 $ CACHE STRING set(LUAJIT_USE_TEST OFF CACHE BOOL "Generate target" FORCE) -# Enable internal LuaJIT assertions for Tarantool Debug build. # XXX: There is 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..6d9b058eb 100644 --- a/test/luajit-test-init.lua +++ b/test/luajit-test-init.lua @@ -1,2 +1,24 @@ -- 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 + +-- There are some tests launching Lua interpreter, so strict need +-- to be disabled for the child tests too. Hence `strict.off()` is +-- added to `progname` command used in these tests. +-- Unlike LuaJIT, Tarantool doesn't store the given CLI flags in +-- `arg`, so the table has the following layout: +-- * arg[-1] -- the binary name +-- * arg[0] -- the script name +-- * arg[N] -- the script argument for all N in [1, #arg] +-- The former one can be used to adjust the command to be used in +-- child tests. +-- XXX: Quotes types are important. +-- XXX: luacheck thinks that `arg` is read-only global variable. +-- luacheck: no global +arg[-1] = arg[-1]..' -e "require[[strict]].off()"' diff --git a/third_party/luajit b/third_party/luajit index 75e6e90dd..eefe18886 160000 --- a/third_party/luajit +++ b/third_party/luajit @@ -1 +1 @@ -Subproject commit 75e6e90ddfbebbb5ff36d99afc1becf9e53249d6 +Subproject commit eefe18886813ab0872471588f02b277eb370d25d -- 2.25.0 ================================================================================ Furthermore, I've squashed two last commits in LuaJIT repo into one. Here is the patch: ================================================================================ >From eefe18886813ab0872471588f02b277eb370d25d Mon Sep 17 00:00:00 2001 Message-Id: From: Sergey Kaplun Date: Tue, 2 Mar 2021 18:15:37 +0300 Subject: [PATCH] test: disable LuaJIT CLI tests in lua-Harness suite This patch disables 241-standalone.t and 411-luajit.t from lua-Harness test suite, because some flags in LuaJIT and Tarantool work differently, or they are not supported in Tarantool at all. For example, -i, -b, -j. See tarantool/tarantool#5541. Resolves tarantool/tarantool#5844 Part of tarantool/tarantool#4473 Reviewed-by: Sergey Ostanevich Reviewed-by: Igor Munkin --- .../{241-standalone.t => 241-standalone.t.disabled} | 0 test/lua-Harness-tests/{411-luajit.t => 411-luajit.t.disabled} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/lua-Harness-tests/{241-standalone.t => 241-standalone.t.disabled} (100%) rename test/lua-Harness-tests/{411-luajit.t => 411-luajit.t.disabled} (100%) diff --git a/test/lua-Harness-tests/241-standalone.t b/test/lua-Harness-tests/241-standalone.t.disabled similarity index 100% rename from test/lua-Harness-tests/241-standalone.t rename to test/lua-Harness-tests/241-standalone.t.disabled diff --git a/test/lua-Harness-tests/411-luajit.t b/test/lua-Harness-tests/411-luajit.t.disabled similarity index 100% rename from test/lua-Harness-tests/411-luajit.t rename to test/lua-Harness-tests/411-luajit.t.disabled -- 2.25.0 ================================================================================ If you're OK with everything above, I'll push the series to the trunk. > > > > > 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 > > > > > > > > > > > > > > > -- > > > 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 -- Best regards, IM