[Tarantool-patches] [PATCH] test: disable cases in PUC-Rio tests for debug line hook

Sergey Bronnikov estetus at gmail.com
Mon Feb 6 10:44:30 MSK 2023


From: Sergey Bronnikov <sergeyb at tarantool.org>

In order to fix issue [1] it is required to introduce a wrapper for
`__pairs()`. This wrapper breaks a couple of tests for builtin debug
module. Patch disables testcases when running under Tarantool.

1. https://github.com/tarantool/tarantool/issues/2867
---
 test/PUC-Rio-Lua-5.1-tests/db.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/PUC-Rio-Lua-5.1-tests/db.lua b/test/PUC-Rio-Lua-5.1-tests/db.lua
index b148c2dd..b05075bb 100644
--- a/test/PUC-Rio-Lua-5.1-tests/db.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/db.lua
@@ -169,10 +169,12 @@ test([[for i=1,3 do
 end
 ]], {1,2,1,2,1,2,1,3})
 
+if not _TARANTOOL then
 test([[for i,v in pairs{'a','b'} do
   a=i..v
 end
 ]], {1,2,1,2,1,3})
+end
 
 -- Test is adapted to the behaviour of LuaJIT, as it generates
 -- only four line events, unlike Lua, which generates five
@@ -411,7 +413,9 @@ function g1(x) g(x) end
 
 local function h (x) local f=g1; return f(x) end
 
+if not _TARANTOOL then
 h(true)
+end
 
 local b = {}
 debug.sethook(function (e) table.insert(b, e) end, "cr")
-- 
2.34.1



More information about the Tarantool-patches mailing list