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 40B406EC60; Wed, 31 Mar 2021 01:14:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 40B406EC60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617142445; bh=tRrsvClO6q1XFtGfpnXhoSLTbK8+F+VfOp4Dg1tcyDc=; 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=uiyo6PHTXJ9dilhFD+r6e+Z6m/XAN6q9r6zeHwziZKAmnPb+wdxTOK9ZFgH0l9lw2 LLqCsYA9Z3+PNnOoZ7aVlk/luamsvKT/xzs1jNT+tLWF1sXgucPexVGri/FqYVGjqW AHvmoVvhfPI/aqFhyV7TrY06e2lVThlahcxXaY3M= 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 AB95C6EC60 for ; Wed, 31 Mar 2021 01:14:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AB95C6EC60 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lRMcc-0004EM-BS; Wed, 31 Mar 2021 01:14:02 +0300 Date: Wed, 31 Mar 2021 01:13:52 +0300 To: Sergey Kaplun Message-ID: <20210330221352.GR29703@tarantool.org> References: <99ce4b411ab34067105f6f7c58b7a736c32a05f7.1616743343.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <99ce4b411ab34067105f6f7c58b7a736c32a05f7.1616743343.git.skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947A0146560F8BA709498CFB6209D8582A182A05F53808504071BBA0C6D193FFC7622D858094079FD5091348A67D734AA93F91674F198DAEDB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76D4A2B7BAC4DEDB8EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006376F127A835590024F8F08D7030A58E5ADC58D69EE07B14084C6CDE5D1141D2B1CEAD1E113473F685B7D15EF5AD0EF5CDFF039C56FE97DC1229FA2833FD35BB23D9E625A9149C048EE33AC447995A7AD18C26CFBAC0749D213D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B3A703B70628EAD7BA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249B372FE9A2E580EFC725E5C173C3A84C3BDF4CCDB414B147D35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F60894D097F901B7558688B39FA754255D0DFB8CCF60F6B7FD3948E1CD14B953EB46DD6E1EB51B7582660355D89D7DBCDD132 X-C1DE0DAB: 0D63561A33F958A5254F62760D52CBC80BFFD7787C5AFCD7D1157078ECAC5E85D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3498910055B812BD9CBF721AF93D6CFC4CA1218763057022547157F5B7F1651DDA346780C6878E8B3F1D7E09C32AA3244C2A294520E037C7DA42691255FB3F8383FE8DA44ABE2443F7927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojfQIxm2xDGoY6BbF3GQG3Rw== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382237ABB7A7B691F6A4026022B856F10DC5A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 01/30] test: add PUC-Rio Lua 5.1 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, Thanks for the patch! LGTM, except the nits below. On 26.03.21, Sergey Kaplun wrote: > This patch adds PUC-Rio Lua 5.1 test suite as a part of the LuaJIT test > suite. Source code taken verbatim (except trailing whitespaces) from Typo: s/code taken/code is taken/. Typo: I believe it's always singular: whitespace. > https://www.lua.org/tests/lua5.1-tests.tar.gz. > > Some tests may fail after this commit. They will be disabled > or adapted in the next patches. > > Part of tarantool/tarantool#5845 > Part of tarantool/tarantool#4473 > --- > .luacheckrc | 5 +- > test/CMakeLists.txt | 2 + > test/PUC-Lua-5.1-tests/CMakeLists.txt | 45 + > test/PUC-Lua-5.1-tests/README | 41 + > test/PUC-Lua-5.1-tests/all.lua | 137 +++ > test/PUC-Lua-5.1-tests/api.lua | 711 ++++++++++++ > test/PUC-Lua-5.1-tests/attrib.lua | 339 ++++++ > test/PUC-Lua-5.1-tests/big.lua | 381 +++++++ > test/PUC-Lua-5.1-tests/calls.lua | 294 +++++ > test/PUC-Lua-5.1-tests/checktable.lua | 77 ++ > test/PUC-Lua-5.1-tests/closure.lua | 422 +++++++ > test/PUC-Lua-5.1-tests/code.lua | 143 +++ > test/PUC-Lua-5.1-tests/constructs.lua | 240 ++++ > test/PUC-Lua-5.1-tests/db.lua | 499 +++++++++ > test/PUC-Lua-5.1-tests/errors.lua | 250 +++++ > test/PUC-Lua-5.1-tests/etc/ltests.c | 1147 ++++++++++++++++++++ > test/PUC-Lua-5.1-tests/etc/ltests.h | 92 ++ > test/PUC-Lua-5.1-tests/events.lua | 360 ++++++ > test/PUC-Lua-5.1-tests/files.lua | 324 ++++++ > test/PUC-Lua-5.1-tests/gc.lua | 312 ++++++ > test/PUC-Lua-5.1-tests/libs/CMakeLists.txt | 18 + > test/PUC-Lua-5.1-tests/libs/lib1.c | 40 + > test/PUC-Lua-5.1-tests/libs/lib11.c | 18 + > test/PUC-Lua-5.1-tests/libs/lib2.c | 28 + > test/PUC-Lua-5.1-tests/libs/lib21.c | 18 + > test/PUC-Lua-5.1-tests/literals.lua | 176 +++ > test/PUC-Lua-5.1-tests/locals.lua | 127 +++ > test/PUC-Lua-5.1-tests/main.lua | 159 +++ > test/PUC-Lua-5.1-tests/math.lua | 208 ++++ > test/PUC-Lua-5.1-tests/nextvar.lua | 396 +++++++ > test/PUC-Lua-5.1-tests/pm.lua | 273 +++++ > test/PUC-Lua-5.1-tests/sort.lua | 74 ++ > test/PUC-Lua-5.1-tests/strings.lua | 176 +++ > test/PUC-Lua-5.1-tests/vararg.lua | 126 +++ > test/PUC-Lua-5.1-tests/verybig.lua | 100 ++ > 35 files changed, 7756 insertions(+), 2 deletions(-) > create mode 100644 test/PUC-Lua-5.1-tests/CMakeLists.txt > create mode 100644 test/PUC-Lua-5.1-tests/README > create mode 100755 test/PUC-Lua-5.1-tests/all.lua Minor: I doubt all.lua need to be an executable. Feel free to ignore. > create mode 100644 test/PUC-Lua-5.1-tests/api.lua > create mode 100644 test/PUC-Lua-5.1-tests/attrib.lua > create mode 100644 test/PUC-Lua-5.1-tests/big.lua > create mode 100644 test/PUC-Lua-5.1-tests/calls.lua > create mode 100644 test/PUC-Lua-5.1-tests/checktable.lua > create mode 100644 test/PUC-Lua-5.1-tests/closure.lua > create mode 100644 test/PUC-Lua-5.1-tests/code.lua > create mode 100644 test/PUC-Lua-5.1-tests/constructs.lua > create mode 100644 test/PUC-Lua-5.1-tests/db.lua > create mode 100644 test/PUC-Lua-5.1-tests/errors.lua > create mode 100644 test/PUC-Lua-5.1-tests/etc/ltests.c > create mode 100644 test/PUC-Lua-5.1-tests/etc/ltests.h > create mode 100644 test/PUC-Lua-5.1-tests/events.lua > create mode 100644 test/PUC-Lua-5.1-tests/files.lua > create mode 100644 test/PUC-Lua-5.1-tests/gc.lua > create mode 100644 test/PUC-Lua-5.1-tests/libs/CMakeLists.txt > create mode 100644 test/PUC-Lua-5.1-tests/libs/lib1.c > create mode 100644 test/PUC-Lua-5.1-tests/libs/lib11.c > create mode 100644 test/PUC-Lua-5.1-tests/libs/lib2.c > create mode 100644 test/PUC-Lua-5.1-tests/libs/lib21.c > create mode 100644 test/PUC-Lua-5.1-tests/literals.lua > create mode 100644 test/PUC-Lua-5.1-tests/locals.lua > create mode 100644 test/PUC-Lua-5.1-tests/main.lua > create mode 100644 test/PUC-Lua-5.1-tests/math.lua > create mode 100644 test/PUC-Lua-5.1-tests/nextvar.lua > create mode 100644 test/PUC-Lua-5.1-tests/pm.lua > create mode 100644 test/PUC-Lua-5.1-tests/sort.lua > create mode 100644 test/PUC-Lua-5.1-tests/strings.lua > create mode 100644 test/PUC-Lua-5.1-tests/vararg.lua > create mode 100644 test/PUC-Lua-5.1-tests/verybig.lua > > diff --git a/test/PUC-Lua-5.1-tests/CMakeLists.txt b/test/PUC-Lua-5.1-tests/CMakeLists.txt > new file mode 100644 > index 0000000..773db0d > --- /dev/null > +++ b/test/PUC-Lua-5.1-tests/CMakeLists.txt > @@ -0,0 +1,45 @@ > +# Test suite that has been added from PUC-Rio Lua 5.1 test archive > +# in scope of https://github.com/tarantool/tarantool/issues/5845. > + > +# See the rationale in the root CMakeLists.txt. > +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > + > +# XXX: There are two ways to set up the proper environment > +# described in the suite's README: > +# * set LUA_PATH to "?;./?.lua" > +# * or, better yet, set LUA_PATH to "./?.lua;;" and LUA_INIT to > +# "package.path = '?;'..package.path" > +# Unfortunately, Tarantool doesn't support LUA_INIT and most > +# likely it never will. For more info, see > +# https://github.com/tarantool/tarantool/issues/5744 > +# Hence, there is no way other than set LUA_PATH environment > +# variable as proposed in the first case. > +set(LUA_PATH "?\;${CMAKE_CURRENT_SOURCE_DIR}/?.lua") > + > +# Set PUC-Lua-5.1-tests-prepare target that creates Minor: IMHO, "set" fits worse here than "create" or "introduce". Feel free to ignore. > +# subdirectory. > +add_subdirectory(libs) > + > +# TODO: PUC-Rio Lua 5.1 test suite also has special header > +# and translation unit to check some > +# internal behaviour of the Lua implementation (see etc/ > +# directory). It modifies realloc function to check memory > +# consistency and also contains tests for yield in hooks > +# and for the Lua C API. > +# But, unfortunately, depends on specific PUC-Rio > +# Lua 5.1 internal headers and should be adapted for LuaJIT. > + > +add_custom_target(PUC-Lua-5.1-tests > + DEPENDS ${LUAJIT_TEST_BINARY} PUC-Lua-5.1-tests-prepare > +) > + > +add_custom_command(TARGET PUC-Lua-5.1-tests > + COMMENT "Running PUC-Rio Lua 5.1 tests" > + COMMAND > + env > + LUA_PATH="${LUA_PATH}\;\;" > + ${LUAJIT_TEST_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/all.lua > + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} > +) > + > +# vim: expandtab tabstop=2 shiftwidth=2 > diff --git a/test/PUC-Lua-5.1-tests/libs/CMakeLists.txt b/test/PUC-Lua-5.1-tests/libs/CMakeLists.txt > new file mode 100644 > index 0000000..f24e7f3 > --- /dev/null > +++ b/test/PUC-Lua-5.1-tests/libs/CMakeLists.txt > @@ -0,0 +1,18 @@ > +# Test suite that has been added from PUC-Rio Lua 5.1 test archive > +# in scope of https://github.com/tarantool/tarantool/issues/5845. > + > +# See the rationale in the root CMakeLists.txt. > +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > + Minor: What about TODO for building libs/*.c sources? Anyway, you did it in the following patch, so feel free to ignore. > +# The original tarball contains subdirectory "libs" with an empty > +# subdirectory "libs/P1", to be used by tests. > +# Instead of tracking empty directory with some anchor-file for > +# git, create this directory via CMake. > +add_custom_target(PUC-Lua-5.1-tests-prepare) > +add_custom_command(TARGET PUC-Lua-5.1-tests-prepare > + COMMENT "Create directory for PUC-Rio Lua 5.1 tests" > + COMMAND ${CMAKE_COMMAND} -E make_directory P1 > + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} > +) > + > +# vim: expandtab tabstop=2 shiftwidth=2 > -- > 2.31.0 > -- Best regards, IM