Skip to content

Commit 471522b

Browse files
committed
test: skip <string/dump.lua> test for table bump
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. Reviewed-by: Maxim Kokryashkin <[email protected]> Reviewed-by: Sergey Bronnikov <[email protected]> Signed-off-by: Sergey Kaplun <[email protected]> (cherry picked from commit 5daf61c)
1 parent 7adae6d commit 471522b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

test/LuaJIT-tests/CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
7171
list(APPEND LUAJIT_TEST_TAGS_EXTRA +libc=${LIBC_VERSION})
7272
endif()
7373

74+
if(LUAJIT_ENABLE_TABLE_BUMP)
75+
# Test <string/dump.lua> verifies that the bytecode is unchanged
76+
# for the prototype with the recorded trace. Table bump
77+
# optimization changes the TNEW/TDUP bytecodes, so skip the test
78+
# in that case.
79+
list(APPEND LUAJIT_TEST_TAGS_EXTRA +table_bump)
80+
endif()
81+
7482
set(TEST_SUITE_NAME "LuaJIT-tests")
7583

7684
# XXX: The call produces both test and target <LuaJIT-tests-deps>

test/LuaJIT-tests/lib/string/dump.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local loadstring = loadstring or load
22

3-
do --- Must unpatch modified bytecode with ILOOP/JLOOP etc.
3+
do --- Must unpatch modified bytecode with ILOOP/JLOOP etc. -table_bump
44
local function foo()
55
local t = {}
66
for i=1,100 do t[i] = i end

0 commit comments

Comments
 (0)