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 14AC9C6DD87; Wed, 21 Aug 2024 12:02:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 14AC9C6DD87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1724230950; bh=h08L83NaonkJMM5l+4XJL2hEpDE64kyn1f4I1RHPOQ4=; 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=XgMCMp3TfK1UhdQg1+N0l6j/LsJOvj2BM3ieU+nMwnFN71eRhPQZ/KD2ualnKzjaG ruujsJo2LfTmafwQy9sS0L3tyHfsc0lQgdKewOBu/N50ieHp+coPlYHC1uXapro7+L EJm7ZYBlHl5a0SEDGrCcT6p8nNyu6Qk0Z0/XPe/0= Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [95.163.41.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 09135C61982 for ; Wed, 21 Aug 2024 11:59:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 09135C61982 Received: by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1sghBH-00000005aRz-3Uv9; Wed, 21 Aug 2024 11:59:04 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Wed, 21 Aug 2024 11:58:10 +0300 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9DAB542EDD08389FE770B27D8AD976A05EB0477873736AFE1182A05F5380850404C228DA9ACA6FE27EDDF88824065D1C7D27678DDAA806314EC1BEBA56E3676D0EFF80BD07D1CDB794E6D196D713C17FF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F68DA2F3749BB650EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063766C9C3EB94AE7C6E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82433EA4168F30C13C1F3096FD6B0A5BA99D4419B181AB057CC7F00164DA146DAFE8445B8C89999728AA50765F7900637D0FEED2715E18529389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8ED96AA85C75E140D117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006377F02F59195295693EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A556524D54D68AD3E25002B1117B3ED696253F0C231C6AF4E3559C6C5561145D6F09CF0A614B9999B12D69E7FE39063EFC1E618B5D5F965AFD844B52986258B1B1B2D1C9E48B6DC60AE2A7E19323554B122E763F503762DF504B01E27E57D72B634EAF44D9B582CE87C8A4C02DF684249CC203C45FEA855C8F X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF6C640FCE53DE705274E4565C11B1F0C67B8891D17AD3ADD70EF77A8640FBE45A6F890FCD3CEE011BD14E51FF79EEE603FDE066916E636BBDB2A94BCD9D7316CE099274730A498641C226CC413062362A913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojegttVMu7AX853RBO/JMIuw== X-DA7885C5: 93FA915306D11CE0F255D290C0D534F9AE21A9FE4C2B75A017AE8A1EC4FD9CBAC7005AF29BC6B9AD5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9B7B82DEA7ABCF3C07DAC77899D9C4377FDC09C2529DF03C20E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit 07/45] test: enable LuaJIT test 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patch moves the aforementioned test from the to the directory (with slightly renaming to be consistent with other names), includes it in , and names the subtest. Also, it changes the number of iterations to trigger the GC since the number of objects is different when running the test as a part of the LuaJIT test suite. Part of tarantool/tarantool#9398 --- .../{misc/debug_gc.lua => lang/gc_debug.lua} | 31 ++++++++++++------- test/LuaJIT-tests/lang/index | 1 + 2 files changed, 20 insertions(+), 12 deletions(-) rename test/LuaJIT-tests/{misc/debug_gc.lua => lang/gc_debug.lua} (63%) diff --git a/test/LuaJIT-tests/misc/debug_gc.lua b/test/LuaJIT-tests/lang/gc_debug.lua similarity index 63% rename from test/LuaJIT-tests/misc/debug_gc.lua rename to test/LuaJIT-tests/lang/gc_debug.lua index 30fb2b99..bb30adc1 100644 --- a/test/LuaJIT-tests/misc/debug_gc.lua +++ b/test/LuaJIT-tests/lang/gc_debug.lua @@ -1,12 +1,7 @@ - --- Do not run this test unless the JIT compiler is turned off. -if jit and jit.status and jit.status() then return end - local caught, caught_line, caught_mm local function gcmeta() if caught ~= "end" then --- print(debug.traceback()) -- This may point to the wrong instruction if in a JIT trace. -- But there's no guarantee if, when or where any GC steps occur. local dbg = debug.getinfo(2) @@ -22,7 +17,7 @@ local function testgc(mm, f) local u = newproxy(true) getmetatable(u).__gc = gcmeta u = nil - for i=1,100000 do + for i = 1, 1e7 do f(i) -- This check may be hoisted. __gc is not supposed to have side-effects. if caught then break end @@ -38,10 +33,22 @@ local function testgc(mm, f) end end -local x -testgc("__gc", function(i) x = {} end) -testgc("__gc", function(i) x = {1} end) -testgc("__gc", function(i) x = function() end end) -testgc("__concat", function(i) x = i.."" end) +do --- Test __gc metamethod info + -- Do not run this test unless the JIT compiler is turned off. + local jit_need_restore = false + if jit and jit.status and jit.status() then + jit_need_restore = true + jit.off() + end + + local x + testgc("__gc", function(i) x = {} end) + testgc("__gc", function(i) x = {1} end) + testgc("__gc", function(i) x = function() end end) + testgc("__concat", function(i) x = i.."" end) -caught = "end" + caught = "end" + if jit_need_restore then + jit.on() + end +end diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index index 803f32d8..4d9feafd 100644 --- a/test/LuaJIT-tests/lang/index +++ b/test/LuaJIT-tests/lang/index @@ -17,5 +17,6 @@ upvalue tail_recursion.lua vararg_jit.lua gc.lua +gc_debug.lua goto.lua +goto meta -- 2.45.2