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 7F7DB986798; Tue, 23 Jan 2024 12:40:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7F7DB986798 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1706002800; bh=7D5u3pKXIwCckoqYAniBARvH4XM3mTod/G3W2RzX48A=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=hHFPC3tC5Q7hW61ZTvokyJC0I4GRo4m4BrOnbQvyTzQobRptY6Sx7tVdd8aAD+6JX Dp4p3xyS/2AelDGoJXx2C3XqwnwYXTxH9L72607TFfeKVPwMVf5sNcZ315+OFHnyVM 3ASqSpWg9m5J6n2wddCSbxNg2smcv+7JhCneLaU0= Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [95.163.41.78]) (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 A6DEB986796 for ; Tue, 23 Jan 2024 12:39:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A6DEB986796 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1rSDGA-00Eibh-1L; Tue, 23 Jan 2024 12:39:58 +0300 Message-ID: <9005e02f-1188-4003-9ac3-e3de0adf2344@tarantool.org> Date: Tue, 23 Jan 2024 12:39:58 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: <546d36fb21e4f1df4dd908aeeeffb20be527cbe9.1705661401.git.skaplun@tarantool.org> In-Reply-To: <546d36fb21e4f1df4dd908aeeeffb20be527cbe9.1705661401.git.skaplun@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9AE5B4AFB3AE2A590E10A57BB36FAC7D4F681D642268DCBB5182A05F538085040E875EA2CC26F03461F3BFA6E1C29CAAF613A49A711433A3BAB780E08CB15EE75 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71BF69A9C8C5AF260EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006377F69ABDCCC31D2058638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D85B55D309C1710E4D6F4F333ED8BD07C1117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18CB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE9647ADFADE5905B1D7C2347B1D03E769D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3BFD98ABA943BD70B040F9FF01DFDA4A8C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C1D471462564A2E192E808ACE2090B5E1725E5C173C3A84C317B107DEF921CE79089D37D7C0E48F6C8AA50765F7900637571EAFDAACF43475EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A59A12ED0C1492F6626F8EB7164892E579A5BB2383CD4DD81EF87CCE6106E1FC07E67D4AC08A07B9B013BDA61BF53F5E1DCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFF29DC0D0F8B4DEF42859655CC3FB7D24053DF9A4D319B293302572B696CC59E34905B00F5DFE93A24BEAD515961AA0A7AA4C4CE3632EDE1A89C96B3453A47DD0E48CAC7CA610320002C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGSQVxX8i/5Ve8vHq14B2Zw== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F25884582F2AD1C1EA33F60E69DE945CDE90EE213893FEE2500F6304282EC151BADDC1D3523A6D01B4765B2DFB59E2DDD9FE06B14FA522850F29BC30B0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 08/25] test: enable in LuaJIT-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: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! thanks for the patch! see comments below On 1/19/24 14:32, Sergey Kaplun wrote: > This patch changes `dofile()` to the corresponding require and renames > the C library in the `require()` call. It adds groups with the names of > subtests and enables the test in . It renames structure and enum > typedefs to avoid conflicts with cdef in other tests. The GC threshold > is increased since all tests run in a single process, so the number of > GC objects is greater. > > Part of tarantool/tarantool#9398 > --- > test/LuaJIT-tests/lib/ffi/ffi_convert.lua | 35 +++++++++++------------ > test/LuaJIT-tests/lib/ffi/index | 1 + > 2 files changed, 18 insertions(+), 18 deletions(-) > > diff --git a/test/LuaJIT-tests/lib/ffi/ffi_convert.lua b/test/LuaJIT-tests/lib/ffi/ffi_convert.lua > index bd3fb1f9..284f2b53 100644 > --- a/test/LuaJIT-tests/lib/ffi/ffi_convert.lua > +++ b/test/LuaJIT-tests/lib/ffi/ffi_convert.lua > @@ -1,8 +1,7 @@ > local ffi = require("ffi") > > -local ctest = require("ctest") > - > -dofile("../common/ffi_util.inc") > +local ctest = require("libctest") > +local fails = require("common.fails") > > local tonumber = tonumber > > @@ -32,15 +31,15 @@ typedef struct arrinc_t { > int a[]; > } arrinc_t; > > -typedef enum uenum_t { > +typedef enum uenum_convert_t { > UE0, UE71 = 71, UE72 > -} uenum_t; > +} uenum_convert_t; > > -typedef enum ienum_t { > +typedef enum ienum_convert_t { > IE0, IEM12 = -12, IEM11 > -} ienum_t; > +} ienum_convert_t; > > -typedef struct foo_t { > +typedef struct foo_convert_t { > bool b; > int8_t i8; > uint8_t u8; > @@ -79,9 +78,9 @@ typedef struct foo_t { > int si_guard; > nest_t sn; > uni_t ui; > - uenum_t ue; > - ienum_t ie; > -} foo_t; > + uenum_convert_t ue; > + ienum_convert_t ie; > +} foo_convert_t; > > char *strcpy(char *dest, const char *src); > typedef struct FILE FILE; > @@ -89,11 +88,11 @@ int fileno(FILE *stream); > int _fileno(FILE *stream); > ]] > > -do > - local foo_t = ffi.typeof("foo_t") > - local sz = ffi.sizeof(foo_t) > - local x = foo_t() > - local y = foo_t() > +do --- misc why three dashes? > + local foo_convert_t = ffi.typeof("foo_convert_t") > + local sz = ffi.sizeof(foo_convert_t) > + local x = foo_convert_t() > + local y = foo_convert_t() > ffi.fill(x, sz, 0xff) > ffi.fill(y, sz, 0xee) > > @@ -769,7 +768,7 @@ do > x.ppf = ffi.C.strcpy > end > > -do > +do --- GC cdata __index why three dashes? > collectgarbage() > local oc = collectgarbage("count") > local cd = ffi.new"struct { struct { int a; } x;}" > @@ -780,7 +779,7 @@ do > for i=1,2 do > f(cd) > local nc = collectgarbage("count") > - assert(nc < oc + 200, "GC step missing for cdata __index") > + assert(nc < oc * 3, "GC step missing for cdata __index") Hm, why? > jit.off(f) > end > end > diff --git a/test/LuaJIT-tests/lib/ffi/index b/test/LuaJIT-tests/lib/ffi/index > index 0a72daed..5c2be87f 100644 > --- a/test/LuaJIT-tests/lib/ffi/index > +++ b/test/LuaJIT-tests/lib/ffi/index > @@ -7,6 +7,7 @@ ffi_bitfield.lua > ffi_call.lua > ffi_callback.lua > ffi_const.lua > +ffi_convert.lua > istype.lua > jit_array.lua > jit_complex.lua