[Tarantool-patches] [PATCH luajit 6/7] test: fix lua-Harness JIT-related tests

Maxim Kokryashkin m.kokryashkin at tarantool.org
Thu Feb 16 01:35:59 MSK 2023


Hi, Igor!
Thanks for the patch!
Except for the comments mentioned by Sergey, I have a few
other regarding the commit message.
 
> 
>>lua-Harness consider whether JIT is enabled or not in scope of 403-jit.t
>Typo: s/consider/considers
>Typo: s/in scope of/in the scope of the/
>>and 411-luajit.t tests. However, the original condition is wrong, since
>><jit.status> yields false for both cases, when JIT is just turned off
>>and when LuaJIT is build without compiler support. So if <jit.status>
>Typo: s/build/built
>>yields false, the latter case is considered. The condition is fixed to
>>differ both aforementioned cases the following way: when <jit.status>
>>yields only compiler status with no flags listing, LuaJIT is built
>>without compiler; if there is more than one value returned, JIT support
>>is on aboard.
>Typo: s/aboard/board
>>Part of tarantool/tarantool#8252
>>
>>Signed-off-by: Igor Munkin < imun at tarantool.org >
>>---
>> test/lua-Harness-tests/403-jit.t | 2 +-
>> test/lua-Harness-tests/411-luajit.t | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>>diff --git a/test/lua-Harness-tests/403-jit.t b/test/lua-Harness-tests/403-jit.t
>>index 0f986da9..0aa5d367 100755
>>--- a/test/lua-Harness-tests/403-jit.t
>>+++ b/test/lua-Harness-tests/403-jit.t
>>@@ -31,7 +31,7 @@ if not jit then
>>     skip_all("only with LuaJIT")
>> end
>> 
>>-local compiled_with_jit = jit.status()
>>+local compiled_with_jit = select('#', jit.status()) > 1
>> local luajit20 = jit.version_num < 20100 and not jit.version:match'RaptorJIT'
>> local has_jit_opt = compiled_with_jit
>> local has_jit_security = jit.security
>>diff --git a/test/lua-Harness-tests/411-luajit.t b/test/lua-Harness-tests/411-luajit.t
>>index 3a9a7b8f..e3b6c7a8 100755
>>--- a/test/lua-Harness-tests/411-luajit.t
>>+++ b/test/lua-Harness-tests/411-luajit.t
>>@@ -37,7 +37,7 @@ if not pcall(io.popen, lua .. [[ -e "a=1"]]) then
>>     skip_all("io.popen not supported")
>> end
>> 
>>-local compiled_with_jit = jit.status()
>>+local compiled_with_jit = select('#', jit.status()) > 1
>> local has_jutil = pcall(require, 'jit.util')
>> local has_openresty_listing = profile.openresty or jit.version:match'moonjit'
>> 
>>--
>>2.30.2
>--
>Best regards,
>Maxim Kokryashkin
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20230216/9b9dd387/attachment.htm>


More information about the Tarantool-patches mailing list