test(unit): disable JIT when using mocks (#35913)

This fixes the flaky eval/typval_spec.lua tests.
This commit is contained in:
zeertzjq
2025-09-26 05:59:05 +08:00
committed by GitHub
parent 0be3dee44f
commit bfa3e111c2
2 changed files with 6 additions and 3 deletions

View File

@@ -352,6 +352,9 @@ local function alloc_log_new()
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
log.set_mocks = child_call(log.set_mocks)