unittests: Pause garbage collector while executing tests

Temporary (?) workaround for currently failing check_alloc_log tests.
This commit is contained in:
ZyX 2016-10-02 22:47:36 +03:00
parent 82e5af85c1
commit b92d6aaf0d

View File

@ -234,7 +234,9 @@ local function gen_itp(it)
local pid = posix.fork()
if pid == 0 then
posix.close(rd)
collectgarbage('stop')
local err, emsg = pcall(func)
collectgarbage('restart')
emsg = tostring(emsg)
if not err then
posix.write(wr, ('-\n%05u\n%s'):format(#emsg, emsg))