From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Sergey Ostanevich <sergos@tarantool.org>, Igor Munkin <imun@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [WIP luajit 09/15] test: adjust LuaJIT test suite for Tarantool Date: Thu, 4 Mar 2021 13:23:56 +0300 [thread overview] Message-ID: <a6ac5a42d899c583085fb1a6d533d7c7af00df97.1614847731.git.skaplun@tarantool.org> (raw) In-Reply-To: <cover.1614847731.git.skaplun@tarantool.org> 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 <imeevma@gmail.com>: Author Sergey Kaplun <skaplun@tarantool.org>: 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
next prev parent reply other threads:[~2021-03-04 10:29 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-04 10:23 [Tarantool-patches] [WIP luajit 00/15] Adapt LuaVela test suites Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 01/15] test: add PUC-Rio Lua 5.1 test suite Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 02/15] test: adapt PUC-Rio Lua 5.1 test suite for LuaJIT Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 03/15] test: adapt Lua 5.1 test suite for Tarantool Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 04/15] test: add LuaJIT-test-cleanup test suite Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 05/15] test: change tests to match de5568e Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 06/15] test: change tests to match c198167 Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 07/15] test: change tests to match 5a61e1a Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 08/15] test: change LuaJIT suite tests to match b4e6bf0 Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` Sergey Kaplun via Tarantool-patches [this message] 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 10/15] test: add lua-Harness test suite Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 11/15] test: adjust lua-Harness test suite for Tarantool Sergey Kaplun via Tarantool-patches 2021-03-04 10:23 ` [Tarantool-patches] [WIP luajit 12/15] test: disable 305-utf8 of lua-Harness suite Sergey Kaplun via Tarantool-patches 2021-03-04 10:24 ` [Tarantool-patches] [WIP luajit 13/15] test: disable 241-standalone " Sergey Kaplun via Tarantool-patches 2021-03-04 10:24 ` [Tarantool-patches] [WIP luajit 14/15] test: disable 411-luajit " Sergey Kaplun via Tarantool-patches 2021-03-04 10:24 ` [Tarantool-patches] [WIP luajit 15/15] test: skip test for getenv in 309-os.t Sergey Kaplun via Tarantool-patches 2021-03-04 16:24 ` [Tarantool-patches] [WIP luajit 00/15] Adapt LuaVela test suites Sergey Ostanevich via Tarantool-patches 2021-03-04 19:58 ` Sergey Kaplun via Tarantool-patches 2021-03-05 10:48 ` Sergey Ostanevich via Tarantool-patches 2021-03-16 11:21 ` Igor Munkin via Tarantool-patches 2021-03-09 23:59 ` Igor Munkin via Tarantool-patches 2021-03-10 8:09 ` Sergey Kaplun via Tarantool-patches 2021-03-10 10:39 ` Igor Munkin via Tarantool-patches 2021-03-10 9:46 ` Sergey Ostanevich via Tarantool-patches 2021-03-10 10:43 ` Igor Munkin via Tarantool-patches 2021-03-10 16:25 ` 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=a6ac5a42d899c583085fb1a6d533d7c7af00df97.1614847731.git.skaplun@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=sergos@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [WIP luajit 09/15] test: adjust LuaJIT test suite for Tarantool' \ /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