From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 15A60141D45; Fri, 2 Dec 2022 13:15:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 15A60141D45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1669976140; bh=gIRbVV0stPiDWoRpQUkhZxb5Ve1ziMkZ2fCGczrgSKE=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=f53kVgnCa2Zdh8WwIZkJnryp8S/vGoJZJv01nmi3bNIMX3h1S3Vw2MxCYoMgKbDlE V0YGWqTzrXLyXa5UwrE3S5gJXSQ/zltWumubJwAu7uQGeJRdPcrewDD+ymNIhs6oi3 kPQueoVzbMIel3BmIgOIepSKKZluudJHJ8mMAc0M= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1FD52141D45 for ; Fri, 2 Dec 2022 13:15:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1FD52141D45 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1p134z-0002a1-Vr; Fri, 02 Dec 2022 13:15:38 +0300 To: Sergey Kaplun , Maxim Kokryashkin Date: Fri, 2 Dec 2022 13:01:44 +0300 Message-Id: <747403a67925a8c09148cd10ea3514b5f6766395.1669926435.git.imun@tarantool.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD908190A22B884CF14EA346431AA4558F17870083B212A6BFF182A05F538085040747F8A98C0D11B274E65B736FE2EE2AC024FF77E56FC880D461B357B5502F940 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F2393C4755A27B53EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637129C704593A46970EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B6F1F7B995052D5CEB55AC0DEB2C13E65CF45B7ED13FE3C87CC7F00164DA146DAFE8445B8C89999728AA50765F7900637D0FEED2715E18529389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8DBD4EED10340066BF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B569F1129A2C6445075ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A56819B7E7FE09FA94E21B165F6BD2EB84C684D9C40E9CB2ED4EAF44D9B582CE87C8A4C02DF684249C2E763F503762DF50F2237FE565727C05 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A9A0A0BF1A2CAC62615D2BD1AD6F08FD523EE904C8F15AA8B146731C616B07C523BFEBCD98473C211D7E09C32AA3244C5B0D5D9F75ECAFD412C368F86C18CA423A76366E8A9DE7CA927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojdH6LJGuFcaonZwslDtCXcg== X-DA7885C5: E1CAC68ED7BC41B9A690D7832F5E884BC0C4675FB11692484FCAE909B142B354262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73933AF1F914F131DBF5E1684CCF83E023B33141D18152C8097BA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 3/2] test: remove TAP side effects in getmetrics tests X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sometimes TAP functions become hot spots for JIT compiler and the 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. Relates to tarantool/tarantool#7762 Signed-off-by: Igor Munkin --- 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