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 28AA070310; Thu, 4 Mar 2021 13:29:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 28AA070310 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614853768; bh=y7TNqdtrYArvaSEWY9uLfH7EMx7J1huEUo6VIsS/peI=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OJBh/tnoYCTyXKAimRoV4P2ZFFNfdmQpwfr1qBNvxi/8AiLmbCoK7iBKJ5Qx1fJQP gIDGuj5phnJBbyUJfX5GTBoi+G2P5Mv640sKnPtHOJQtK3yG/mPfIzP8wHiuORMKm/ w75GL6z+U39DI+y2HugUPumloHfwMWRZQ/YeaS/k= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 6658C74CC4 for ; Thu, 4 Mar 2021 13:25:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6658C74CC4 Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lHlAE-0000fx-JN; Thu, 04 Mar 2021 13:25:02 +0300 To: Sergey Ostanevich , Igor Munkin Date: Thu, 4 Mar 2021 13:23:56 +0300 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92A98208ECBDD29F5D8C0A06ED169F0586A18EBFAC8707E15182A05F53808504061B50C12B9CB6EED08E3E45A209DB4BCDFC58CFBF927ADA123FCB87A02BF3273 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DECE8D0A5E25C0FCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F898CA578D17CA188638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CDB1C6D2319E1F1676E8AD5131C7572FB8622CF64E67D06D8A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE77A825AB47F0FC8649FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E478A468B35FE767117882F4460429728AD0CFFFB425014E868A13BD56FB6657A7F4EDE966BC389F9E8FC8737B5C2249D0C9BB9AE6BD5D69089D37D7C0E48F6CCF19DD082D7633A0E7DDDDC251EA7DABAAAE862A0553A39223F8577A6DFFEA7CCB4B9D7E49E0773B43847C11F186F3C5E7DDDDC251EA7DABCC89B49CDF41148FBC2A4A7A8370ED8B3C9F3DD0FB1AF5EB4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C4C7A0BC55FA0FE5FC7FFBF58D524698AD3E03CBB5216E03AEADC2CB28935551A9B1881A6453793CE9C32612AADDFBE061C61BE10805914D3804EBA3D8E7E5B87ABF8C51168CD8EBDB791E6C230873D55CDC48ACC2A39D04F89CDFB48F4795C241BDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3480A9008907CB2FD01138C8F7D90E66973A3C0A58FC83539E75FD89DDB3EBF8F9529CBD3B1BCDBB1E1D7E09C32AA3244CBD17E6805E2AF836035F11383079D39169B6CAE0477E908D927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojSsmoOoMLSh0u/yz+AK+lXw== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4907C1A623DF5B758ABF93359CF19A829E2444DB8EDE1B085F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [WIP luajit 09/15] test: adjust LuaJIT test suite for Tarantool 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patch makes it possible to run LuaJIT test suite using Tarantool. It disables these tests from the LuaJIT test suite, because _G and some modules in Tarantool are different from _G and modules in LuaJIT: * 359 lib/contents.lua --- base * 364 lib/contents.lua --- string * 366 lib/contents.lua --- pre-5.2 table * 370 lib/contents.lua --- os * 371 lib/contents.lua --- debug * 372 lib/contents.lua --- package * 374 lib/contents.lua --- package.loaders * 375 lib/contents.lua --- package.loaded Part of tarantool/tarantool#4064 Part of tarantool/tarantool#4473 --- Mergen Imeev : Author Sergey Kaplun : glanced commit message, made commit consistence with the tarantool branch. test/LuaJIT-tests/lib/contents.lua | 78 ++++++++++++++++++------------ 1 file changed, 47 insertions(+), 31 deletions(-) diff --git a/test/LuaJIT-tests/lib/contents.lua b/test/LuaJIT-tests/lib/contents.lua index 45c07eb..eeced86 100644 --- a/test/LuaJIT-tests/lib/contents.lua +++ b/test/LuaJIT-tests/lib/contents.lua @@ -18,9 +18,11 @@ local function check(m, expected, exclude) end end -do --- base - check(_G, "_G:_VERSION:arg:assert:collectgarbage:coroutine:debug:dofile:error:getmetatable:io:ipairs:load:loadfile:math:misc:next:os:package:pairs:pcall:print:rawequal:rawget:rawset:require:select:setmetatable:string:table:tonumber:tostring:type:xpcall", "rawlen:bit:bit32:jit:gcinfo:setfenv:getfenv:loadstring:unpack:module:newproxy") -end +-- Test is disabled, because _G and some modules in Tarantool +-- are different from _G and modules in LuaJIT. +-- do --- base +-- check(_G, "_G:_VERSION:arg:assert:collectgarbage:coroutine:debug:dofile:error:getmetatable:io:ipairs:load:loadfile:math:misc:next:os:package:pairs:pcall:print:rawequal:rawget:rawset:require:select:setmetatable:string:table:tonumber:tostring:type:xpcall", "rawlen:bit:bit32:jit:gcinfo:setfenv:getfenv:loadstring:unpack:module:newproxy") +-- end do --- pre-5.2 base +lua<5.2 assert(gcinfo) @@ -64,9 +66,11 @@ do --- 5.2 math +lua>=5.2 assert(not math.log10) end -do --- string - check(string, "byte:char:dump:find:format:gmatch:gsub:len:lower:match:rep:reverse:sub:upper", "gfind") -end +-- Test is disabled for the Tarantool's binary, +-- see the comment above. +-- do --- string +-- check(string, "byte:char:dump:find:format:gmatch:gsub:len:lower:match:rep:reverse:sub:upper", "gfind") +-- end do --- pre-5.2 string +lua<5.2 -compat5.2 assert(not string.gfind) @@ -76,9 +80,11 @@ do --- 5.2 string +lua>=5.2 assert(not string.gfind) end -do --- pre-5.2 table +lua<5.2 - check(table, "concat:foreach:foreachi:getn:insert:maxn:move:remove:sort", "pack:unpack:setn:new") -end +-- Test is disabled for the Tarantool's binary, +-- see the comment above. +-- do --- pre-5.2 table +lua<5.2 +-- check(table, "concat:foreach:foreachi:getn:insert:maxn:move:remove:sort", "pack:unpack:setn:new") +-- end do --- 5.2 table +lua>=5.2 check(table, "concat:insert:pack:remove:sort:unpack") @@ -102,19 +108,25 @@ do --- io file check(debug.getmetatable(io.stdin), "__gc:__index:__tostring:close:flush:lines:read:seek:setvbuf:write") end -do --- os - check(os, "clock:date:difftime:execute:exit:getenv:remove:rename:setlocale:time:tmpname") -end +-- Test is disabled for the Tarantool's binary, +-- see the comment above. +-- do --- os +-- check(os, "clock:date:difftime:execute:exit:getenv:remove:rename:setlocale:time:tmpname") +-- end -do --- debug - check(debug, "debug:gethook:getinfo:getlocal:getmetatable:getregistry:getupvalue:sethook:setlocal:setmetatable:setupvalue:traceback", "getfenv:setfenv:upvalueid:upvaluejoin:getuservalue:setuservalue") -end +-- Test is disabled for the Tarantool's binary, +-- see the comment above. +-- do --- debug +-- check(debug, "debug:gethook:getinfo:getlocal:getmetatable:getregistry:getupvalue:sethook:setlocal:setmetatable:setupvalue:traceback", "getfenv:setfenv:upvalueid:upvaluejoin:getuservalue:setuservalue") +-- end -- TODO: Check versional differences in debug library -do --- package - check(package, "config:cpath:loaded:loadlib:path:preload", "searchpath:loaders:searchers:seeall") -end +-- Test is disabled for the Tarantool's binary, +-- see the comment above. +-- do --- package +-- check(package, "config:cpath:loaded:loadlib:path:preload", "searchpath:loaders:searchers:seeall") +-- end do --- pre-5.2 package +lua<5.2 assert(package.loaders) @@ -128,19 +140,23 @@ do --- 5.2 package +lua>=5.2 assert(not package.seeall) end -do --- package.loaders - check(package.loaders or package.searchers, "1:2:3:4") -end - -do --- package.loaded - local loaded = {} - for k, v in pairs(package.loaded) do - if type(k) ~= "string" or (k:sub(1, 7) ~= "common." and k:sub(1, 4) ~= "jit.") then - loaded[k] = v - end - end - check(loaded, "_G:coroutine:debug:io:math:misc:misc.memprof:os:package:string:table", "bit:bit32:common:ffi:jit:table.new") -end +-- Test is disabled for the Tarantool's binary, +-- see the comment above. +-- do --- package.loaders +-- check(package.loaders or package.searchers, "1:2:3:4") +-- end + +-- Test is disabled for the Tarantool's binary, +-- see the comment above. +-- do --- package.loaded +-- local loaded = {} +-- for k, v in pairs(package.loaded) do +-- if type(k) ~= "string" or (k:sub(1, 7) ~= "common." and k:sub(1, 4) ~= "jit.") then +-- loaded[k] = v +-- end +-- end +-- check(loaded, "_G:coroutine:debug:io:math:misc:misc.memprof:os:package:string:table", "bit:bit32:common:ffi:jit:table.new") +-- end do --- bit +bit check(bit, "arshift:band:bnot:bor:bswap:bxor:lshift:rol:ror:rshift:tobit:tohex") -- 2.28.0