<!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:7f684c8c14d12aa796ed5f3b70ea91d68f0e3b38.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:7f684c8c14d12aa796ed5f3b70ea91d68f0e3b38.1724228998.git.skaplun@tarantool.org">
      <pre class="moz-quote-pre" wrap="">
 test/LuaJIT-tests/trace/index                     | 1 +
 test/LuaJIT-tests/{misc => trace}/stack_purge.lua | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)
 rename test/LuaJIT-tests/{misc => trace}/stack_purge.lua (87%)

diff --git a/test/LuaJIT-tests/trace/index b/test/LuaJIT-tests/trace/index
index 3ab095a7..4826f429 100644
--- a/test/LuaJIT-tests/trace/index
+++ b/test/LuaJIT-tests/trace/index
@@ -8,4 +8,5 @@ hook_record.lua
 jit_flush.lua
 phi
 snap.lua
+stack_purge.lua
 stitch.lua
diff --git a/test/LuaJIT-tests/misc/stack_purge.lua b/test/LuaJIT-tests/trace/stack_purge.lua
similarity index 87%
rename from test/LuaJIT-tests/misc/stack_purge.lua
rename to test/LuaJIT-tests/trace/stack_purge.lua
index bfaee0f3..6d2876af 100644
--- a/test/LuaJIT-tests/misc/stack_purge.lua
+++ b/test/LuaJIT-tests/trace/stack_purge.lua
@@ -1,4 +1,3 @@
-
 -- Must preserve the modified function slot in the RET snapshot.
 local function a()
   local _,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_
@@ -20,6 +19,7 @@ local function c()
   end
 end
 
-jit.off(c)
-c()
-
+do --- Don't purge the function to return from SNAP.
+  jit.off(c)
+  c()
+end
</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>