Sergey,

On 21.08.2024 11:58, Sergey Kaplun wrote:
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
---
thanks for the patch! LGTM
 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