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 01B319E43F2; Thu, 1 Feb 2024 12:19:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 01B319E43F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1706779181; bh=ePkh18USngDnS1eWLlECeB7XVncjn++DVXKYgr/UOGc=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=aKJE8YEG8JwvHG5NGUbgdSLUO+iLTcRr7mCv7Qa3AKm8aVBr23iO/Es1g78lIxdVs sFd7M9iBSJirbDY8BcbJWG2uwoWAXUHGLriJ7ZVj9bnNMO53WnwoMDoKyzX6AQ/Oft tvPGj0AhuUwwywxIWmU8rGXVr64eyDqVyJvurZFQ= Received: from smtp43.i.mail.ru (smtp43.i.mail.ru [95.163.41.66]) (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 28DFE9E43EA for ; Thu, 1 Feb 2024 12:19:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 28DFE9E43EA Received: by smtp43.i.mail.ru with esmtpa (envelope-from ) id 1rVTEQ-00000003FDO-2Ff5; Thu, 01 Feb 2024 12:19:38 +0300 Date: Thu, 1 Feb 2024 12:19:38 +0300 To: Sergey Kaplun Message-ID: <3mp6fy366vr2sbxgr6tf2h7la62222a7esmwyhyacmtyed6s6b@adceh4obad4d> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD93C58C36AA2E99649913F598E3EEE18285DA7E33959698359182A05F5380850404C228DA9ACA6FE271804376273F11EEDA6D5EE0DB6E1EC8D6C5FD50FBFB8F149772D0046C3B3007A039F47AC1EBC7B57 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D6964C9E324ABA58EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063739E242D0556ED1DD8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8E90BBA9E32778E37DC83911887C9693F9DA2760D3173420CCC7F00164DA146DAFE8445B8C89999728AA50765F790063783E00425F71A4181389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8EDCF5861DED71B2F389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F790063796140BF0DA724314D81D268191BDAD3DBD4B6F7A4D31EC0BE2F48590F00D11D6D81D268191BDAD3D78DA827A17800CE73745307B7F32D572EC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5278DA827A17800CE754F43A495B1ACFC12EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE72F88032165008D51731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5604949C720BF40045002B1117B3ED696A938374B000E3C25FB820E9FE7BD014C823CB91A9FED034534781492E4B8EEAD2609375A3A81E2DDBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFBCD959B28EDBD1491367477624B140073DE87162671C73590E0369AFE58BDF70F509D27A9878C191BAF4CF3B87E910B12A361561705FAA7DEB04D83559C6B1678CAF76467AD961795F4332CA8FE04980913E6812662D5F2A54F6898A6FDCBDC72A617DFBE5FEC2C6383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqJaWtPsRtynytREcXeC5tQ== X-Mailru-Sender: 7940E2A4EB16C9970E7603824FE97C206336C04F9B2C7E0D0EBC49B76510125937DE8EFEC0D3F822B6F7D78CE1F58EAD61AD1BC23DFB21333DDE9B364B0DF289BB83A8C3DAEBA78A61AAEF30F77CACB9EAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 22/26] 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the patch! Please consider my comments below. On Mon, Jan 29, 2024 at 01:45:22PM +0300, Sergey Kaplun wrote: > This patch moves the test from the LuaJIT-tests suite to > the tarantool-tests suite, because this test should be run separately to > avoid overflow of the table with ctypes for other tests from > LuaJIT-tests suite. > > Part of tarantool/tarantool#9398 > --- > test/LuaJIT-tests/lib/ffi/ffi_tabov.lua | 12 ----------- > test/tarantool-tests/ffi-tabov.test.lua | 27 +++++++++++++++++++++++++ > 2 files changed, 27 insertions(+), 12 deletions(-) > delete mode 100644 test/LuaJIT-tests/lib/ffi/ffi_tabov.lua > create mode 100644 test/tarantool-tests/ffi-tabov.test.lua > > diff --git a/test/LuaJIT-tests/lib/ffi/ffi_tabov.lua b/test/LuaJIT-tests/lib/ffi/ffi_tabov.lua > deleted file mode 100644 > index ba621960..00000000 > --- a/test/LuaJIT-tests/lib/ffi/ffi_tabov.lua > +++ /dev/null > @@ -1,12 +0,0 @@ > -local ffi = require("ffi") > - > -local last = 0 > - > -assert(pcall(function() > - for i=1,65536 do > - last = i > - ffi.typeof"struct {}" > - end > -end) == false) > - > -assert(last > 20000) > diff --git a/test/tarantool-tests/ffi-tabov.test.lua b/test/tarantool-tests/ffi-tabov.test.lua > new file mode 100644 > index 00000000..7ea8b24b > --- /dev/null > +++ b/test/tarantool-tests/ffi-tabov.test.lua > @@ -0,0 +1,27 @@ > +local tap = require('tap') > +local ffi = require('ffi') > + > +-- This test is moved here from the LuaJIT-tests suite since it > +-- should be run separately because it exhausts the ctype table. > +local test = tap.test('ffi-tabov') > + > +test:plan(3) > + > +-- XXX: Amount of ctypes available to the user of a platform. Where does this number comes from? Drop a comment. > +local MIN_AVAILABLE_CTYPES = 20000 > + > +local last = 0 > + > +local res, errmsg = pcall(function() > + for i = 1, 2^16 do Drop a comment explaining the number of iterations. > + last = i > + ffi.typeof('struct {}') > + end > +end) > + > +test:ok(res == false, 'correct status') > +test:like(errmsg, 'table overflow', 'correct error message') > + > +test:ok(last > MIN_AVAILABLE_CTYPES, 'huge enough amount of free ctypes') > + > +test:done(true) > -- > 2.43.0 >