[Tarantool-patches] [PATCH v2 luajit 13/30] test: disable PUC Lua test for tail call info
Igor Munkin
imun at tarantool.org
Wed Mar 31 01:15:34 MSK 2021
Sergey,
Thanks for the patch! LGTM, except the nits below.
On 26.03.21, Sergey Kaplun wrote:
> LuaJIT does not provide information about tail calls in debug.getinfo(),
> unlike Lua does. This missed feature is described in
> https://luajit.org/status.html.
>
> This patch disables tests for tail call checks and getfenv() checks,
> because tail calls do not provide an additional level for LuaJIT
It's not "level", but "call frame", AFAIU.
> and level number given to getfenv() should be changed.
>
> Relates to tarantool/tarantool#5702
> Relates to tarantool/tarantool#5703
> Part of tarantool/tarantool#5845
> Part of tarantool/tarantool#4473
> ---
> test/PUC-Lua-5.1-tests/db.lua | 30 ++++++++++++++++++++++--------
> 1 file changed, 22 insertions(+), 8 deletions(-)
>
> diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua
> index c1a635a..b363abc 100644
> --- a/test/PUC-Lua-5.1-tests/db.lua
> +++ b/test/PUC-Lua-5.1-tests/db.lua
> @@ -400,19 +400,29 @@ function g1(x) g(x) end
>
> local function h (x) local f=g1; return f(x) end
>
> -h(true)
> +-- LuaJIT does not provide information about tail calls,
> +-- unlike Lua does. See also https://luajit.org/status.html.
> +-- getfenv() behaviour is also different here,
Typo: looks like line underfull (in LaTeX terms, heh).
> +-- because tail calls do not provide additional level for LuaJIT
> +-- and level number should be changed.
> +-- FIXME: Test is disabled for LuaJIT.
> +-- See also https://github.com/tarantool/tarantool/issues/5702.
> +-- h(true)
<snipped>
> -for _, k in ipairs(res) do assert(k == table.remove(b, 1)) end
> -
Typo: excess whitespace change.
> +-- Behavior is different for LuaJIT. See the comment above.
> +-- FIXME: Test is disabled for LuaJIT.
> +-- for _, k in ipairs(res) do assert(k == table.remove(b, 1)) end
<snipped>
> --
> 2.31.0
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list