Hi, Igor! Thanks for the patch! LGTM, except for the nits Sergey has already mentioned and the two additional nits below.   >  >>Sometimes TAP functions become hot spots for JIT compiler and the >Typo: s/for JIT compiler/for the JIT compiler/ >>corresponding traces spoils test assertions with their side effects. >>To avoid such misbehaviour and fix fragile test, is >>explicitly called in this particular case. There is no need to fix the >>corresponding test for Lua C API interface, since there is no TAP >>helpers used to check whether is counted right. There >>is also no need to fix other subtests nearby, since their assertions are >>no affected by TAP helpers side effects. >Typo: s/no/not/ >> >>Relates to tarantool/tarantool#7762 >> >>Signed-off-by: Igor Munkin < imun@tarantool.org > >>--- >> test/tarantool-tests/misclib-getmetrics-lapi.test.lua | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >>diff --git a/test/tarantool-tests/misclib-getmetrics-lapi.test.lua b/test/tarantool-tests/misclib-getmetrics-lapi.test.lua >>index 19dfd199..0c170d0c 100644 >>--- a/test/tarantool-tests/misclib-getmetrics-lapi.test.lua >>+++ b/test/tarantool-tests/misclib-getmetrics-lapi.test.lua >>@@ -363,7 +363,9 @@ test:test("snap-restores-scalar", function(subtest) >>     -- No exits triggering snap restore so far: snapshot >>     -- restoration was inlined into the machine code. >>     subtest:is(new_metrics.jit_snap_restore - old_metrics.jit_snap_restore, 0) >>- old_metrics = new_metrics >>+ -- XXX: obtain actual metrics to avoid side effects that are >>+ -- caused by Lua code and JIT engine fine tuning above. >>+ old_metrics = misc.getmetrics() >>  >>     -- Simply 2 side exits from the trace: >>     foo(20) >>-- >>2.34.0 >-- >Best regards, >Maxim Kokryashkin