<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Sergey,<br>
</p>
<div class="moz-cite-prefix">On 21.08.2024 11:58, Sergey Kaplun
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:d2c3a7ba8fc606110bcbcad6ea1d383ef9b83e34.1724228998.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">This patch moves the aforementioned test from the <misc> to the <trace/>
directory, includes it in <index>, and names the subtest.
Part of tarantool/tarantool#9398
---</pre>
</blockquote>
thanks for the patch! LGTM<br>
<blockquote type="cite"
cite="mid:d2c3a7ba8fc606110bcbcad6ea1d383ef9b83e34.1724228998.git.skaplun@tarantool.org">
<pre class="moz-quote-pre" wrap="">
test/LuaJIT-tests/misc/tcall_loop.lua | 8 --------
test/LuaJIT-tests/trace/index | 1 +
test/LuaJIT-tests/trace/tcall_loop.lua | 10 ++++++++++
3 files changed, 11 insertions(+), 8 deletions(-)
delete mode 100644 test/LuaJIT-tests/misc/tcall_loop.lua
create mode 100644 test/LuaJIT-tests/trace/tcall_loop.lua
diff --git a/test/LuaJIT-tests/misc/tcall_loop.lua b/test/LuaJIT-tests/misc/tcall_loop.lua
deleted file mode 100644
index d3c6f1a6..00000000
--- a/test/LuaJIT-tests/misc/tcall_loop.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-local function f(i)
- if i > 0 then return f(i-1) end
- return 1
-end
-
-local x = 0
-for i=1,100 do x = x + f(1000) end
-assert(x == 100)
diff --git a/test/LuaJIT-tests/trace/index b/test/LuaJIT-tests/trace/index
index 9de3b478..1b8fb8f4 100644
--- a/test/LuaJIT-tests/trace/index
+++ b/test/LuaJIT-tests/trace/index
@@ -11,3 +11,4 @@ snap.lua
stack_purge.lua
stitch.lua
tcall_base.lua
+tcall_loop.lua
diff --git a/test/LuaJIT-tests/trace/tcall_loop.lua b/test/LuaJIT-tests/trace/tcall_loop.lua
new file mode 100644
index 00000000..7d872644
--- /dev/null
+++ b/test/LuaJIT-tests/trace/tcall_loop.lua
@@ -0,0 +1,10 @@
+local function f(i)
+ if i > 0 then return f(i - 1) end
+ return 1
+end
+
+do --- Recording tailcall with the loop for the tail recursion.
+ local x = 0
+ for _ = 1, 100 do x = x + f(1000) end
+ assert(x == 100)
+end
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>