Hi, Igor! LGTM, except for a few nits below.     >  >>Unfortunately, is too complex to be maintained, so the >>corresponding tests are split into two files: the test itself and the >>script to be run by the test. As a result of the patch >>helper is introduced: it inherits some approaches from , >>but it's considered for more general use. >> >>Relates to tarantool/tarantool#8252 >> >>Signed-off-by: Igor Munkin < imun@tarantool.org > >>--- >> .../gh-4427-ffi-sandwich.test.lua | 69 ++++++++----------- >> .../gh-4427-ffi-sandwich/script.lua | 25 +++++++ >> .../lj-351-print-tostring-number.test.lua | 34 +++------ >> .../lj-351-print-tostring-number/script.lua | 9 +++ >> .../lj-586-debug-non-string-error.test.lua | 2 +- >> .../lj-flush-on-trace.test.lua | 68 ++++++++---------- >> .../lj-flush-on-trace/script.lua | 23 +++++++ >> test/tarantool-tests/utils.lua | 66 +++++------------- >> 8 files changed, 148 insertions(+), 148 deletions(-) >> create mode 100644 test/tarantool-tests/gh-4427-ffi-sandwich/script.lua >> create mode 100644 test/tarantool-tests/lj-351-print-tostring-number/script.lua >> create mode 100644 test/tarantool-tests/lj-flush-on-trace/script.lua >> >>diff --git a/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua b/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua >>index dd02130c..f4795db0 100644 >>--- a/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua >>+++ b/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua >>@@ -3,52 +3,43 @@ local utils = require('utils') > >>+ -- TODO: Leave another toxic comment regarding SIP on macOS. >That comment is unnecessary. Here and below. >  > >> >>diff --git a/test/tarantool-tests/utils.lua b/test/tarantool-tests/utils.lua >>index eb11d40d..41a7c22a 100644 >>--- a/test/tarantool-tests/utils.lua >>+++ b/test/tarantool-tests/utils.lua >>@@ -1,7 +1,6 @@ >> local M = {} >>  >> local ffi = require('ffi') >>-local tap = require('tap') >> local bc = require('jit.bc') >> local bit = require('bit') >>  >>@@ -44,55 +43,28 @@ function M.luacmd(args) >>   return table.concat(args, ' ', idx + 1, -1) >> end >>  >>-local function unshiftenv(variable, value, sep) >>- local envvar = os.getenv(variable) >>- return ('%s="%s%s"'):format(variable, value, >>- envvar and ('%s%s'):format(sep, envvar) or '') >>+local function makeenv(tabenv) >>+ if tabenv == nil then return '' end >>+ local flatenv = {} >>+ for var, value in pairs(tabenv) do >>+ table.insert(flatenv, ('%s=%s'):format(var, value)) >>+ end >>+ return table.concat(flatenv, ' ') >> end >>  >>-function M.selfrun(arg, checks) >>- -- If TEST_SELFRUN is set, it means the test has been run via >>- -- , so just return from this routine and proceed >>- -- the execution to the test payload, ... >>- if os.getenv('TEST_SELFRUN') then return end >>- >>- -- ... otherwise initialize , setup testing environment >>- -- and run this chunk via for each case in . >>- -- XXX: The function doesn't return back from this moment. It >>- -- checks whether all assertions are fine and exits. >>- >>- local test = tap.test(arg[0]:match('/?(.+)%.test%.lua')) >>- >>- test:plan(#checks) >>- >>- local libext = package.cpath:match('?.(%a+);') >>- local vars = { >>+function M.makecmd(arg, opts) >>+ return setmetatable({ >>     LUABIN = M.luacmd(arg), >>- SCRIPT = arg[0], >>- PATH = arg[0]:gsub('%.test%.lua', ''), >>- SUFFIX = libext, >>- ENV = table.concat({ >>- unshiftenv('LUA_PATH', '/?.lua', ';'), >>- unshiftenv('LUA_CPATH', '/?.', ';'), >>- unshiftenv((libext == 'dylib' and 'DYLD' or 'LD') .. '_LIBRARY_PATH', >>- '', ':'), >>- 'TEST_SELFRUN=1', >>- }, ' '), >>- } >>- >>- local cmd = string.gsub(' 2>&1