From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>,
Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit] test: skip <string/dump.lua> test for table bump
Date: Thu, 5 Dec 2024 10:29:21 +0300 [thread overview]
Message-ID: <18d39736-e607-484c-9577-0e96c9028462@tarantool.org> (raw)
In-Reply-To: <20241203112241.6713-1-skaplun@tarantool.org>
[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]
Hi, Sergey,
thanks for the patch! LGTM
On 03.12.2024 14:22, Sergey Kaplun wrote:
> If the `foo()` function itself starts to be recorded on the very first
> call, it leads to the changing of TNEW bytecode when table bump
> optimization is enabled. This patch skips the test for this type of
> build.
> ---
>
> Branch:https://github.com/tarantool/luajit/tree/skaplun/fix-luajit-tests-tablebump
>
> test/LuaJIT-tests/CMakeLists.txt | 8 ++++++++
> test/LuaJIT-tests/lib/string/dump.lua | 2 +-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt
> index 019762e0..d29bcb6e 100644
> --- a/test/LuaJIT-tests/CMakeLists.txt
> +++ b/test/LuaJIT-tests/CMakeLists.txt
> @@ -62,6 +62,14 @@ if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512")
> list(APPEND LUAJIT_TEST_TAGS_EXTRA +avx512)
> endif()
>
> +if(LUAJIT_ENABLE_TABLE_BUMP)
> + # Test <string/dump.lua> verifies that the bytecode is unchanged
> + # for the prototype with the recorded trace. Table bump
> + # optimization changes the TNEW/TDUP bytecodes, so skip the test
> + # in that case.
> + list(APPEND LUAJIT_TEST_TAGS_EXTRA +table_bump)
> +endif()
> +
> set(TEST_SUITE_NAME "LuaJIT-tests")
>
> # XXX: The call produces both test and target <LuaJIT-tests-deps>
> diff --git a/test/LuaJIT-tests/lib/string/dump.lua b/test/LuaJIT-tests/lib/string/dump.lua
> index 216c6eb8..9c29ac50 100644
> --- a/test/LuaJIT-tests/lib/string/dump.lua
> +++ b/test/LuaJIT-tests/lib/string/dump.lua
> @@ -1,6 +1,6 @@
> local loadstring = loadstring or load
>
> -do --- Must unpatch modified bytecode with ILOOP/JLOOP etc.
> +do --- Must unpatch modified bytecode with ILOOP/JLOOP etc. -table_bump
> local function foo()
> local t = {}
> for i=1,100 do t[i] = i end
[-- Attachment #2: Type: text/html, Size: 2336 bytes --]
next prev parent reply other threads:[~2024-12-05 7:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 11:22 Sergey Kaplun via Tarantool-patches
2024-12-05 7:29 ` Sergey Bronnikov via Tarantool-patches [this message]
2024-12-12 10:31 ` Maxim Kokryashkin via Tarantool-patches
2024-12-17 12:31 ` Sergey Kaplun 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=18d39736-e607-484c-9577-0e96c9028462@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=m.kokryashkin@tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit] test: skip <string/dump.lua> test for table bump' \
/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