mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
test(unit): disable JIT when using mocks (#35913)
This fixes the flaky eval/typval_spec.lua tests.
(cherry picked from commit bfa3e111c2
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
7e724dfa2f
commit
a1b9070754
@@ -2318,7 +2318,7 @@ describe('typval.c', function()
|
|||||||
return lib.tv_dict_extend(d1, d2, action)
|
return lib.tv_dict_extend(d1, d2, action)
|
||||||
end, emsg)
|
end, emsg)
|
||||||
end
|
end
|
||||||
pending('works (skip due to flakiness)', function()
|
itp('works', function()
|
||||||
local d1 = dict()
|
local d1 = dict()
|
||||||
alloc_log:check({ a.dict(d1) })
|
alloc_log:check({ a.dict(d1) })
|
||||||
eq({}, dct2tbl(d1))
|
eq({}, dct2tbl(d1))
|
||||||
@@ -3206,7 +3206,7 @@ describe('typval.c', function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
describe('lnum()', function()
|
describe('lnum()', function()
|
||||||
pending('works (skip due to flakiness)', function()
|
itp('works', function()
|
||||||
for _, v in ipairs({
|
for _, v in ipairs({
|
||||||
{ lib.VAR_NUMBER, { v_number = 42 }, nil, 42 },
|
{ lib.VAR_NUMBER, { v_number = 42 }, nil, 42 },
|
||||||
{ lib.VAR_STRING, { v_string = to_cstr('100500') }, nil, 100500 },
|
{ lib.VAR_STRING, { v_string = to_cstr('100500') }, nil, 100500 },
|
||||||
@@ -3335,7 +3335,7 @@ describe('typval.c', function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
describe('string()', function()
|
describe('string()', function()
|
||||||
pending('works (skip due to flakiness)', function()
|
itp('works', function()
|
||||||
local buf = lib.tv_get_string(lua2typvalt(int(1)))
|
local buf = lib.tv_get_string(lua2typvalt(int(1)))
|
||||||
local buf_chk = lib.tv_get_string_chk(lua2typvalt(int(1)))
|
local buf_chk = lib.tv_get_string_chk(lua2typvalt(int(1)))
|
||||||
neq(buf, buf_chk)
|
neq(buf, buf_chk)
|
||||||
|
@@ -347,6 +347,9 @@ local function alloc_log_new()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- JIT-compiled FFI calls cannot call back into Lua, so disable JIT.
|
||||||
|
-- Ref: https://luajit.org/ext_ffi_semantics.html#callback
|
||||||
|
jit.off()
|
||||||
end
|
end
|
||||||
|
|
||||||
log.set_mocks = child_call(log.set_mocks)
|
log.set_mocks = child_call(log.set_mocks)
|
||||||
|
Reference in New Issue
Block a user