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 929639E9872; Tue, 6 Feb 2024 17:02:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 929639E9872 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1707228170; bh=oNL3CFFn3UjrBEjk57gOC3dae135U7SP8siuv9hpaZ4=; 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=OVK2NHzRCYKuIDV7cU9zyn81WU/2d7Pap1a7G17U1++8bZfY6h90XN54M25NUflaN 9ZD84OhfDGFEX/NF7LE/dVloaZx1/1P4DOCbo1PP2sigDnwTt3xJf21WINLe5jV9BU Iq6D3k83ejD0a0yv5+So5bKOsvFODTJO25pfDFoA= Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [95.163.41.91]) (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 AEFC29E9872 for ; Tue, 6 Feb 2024 17:02:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AEFC29E9872 Received: by smtp49.i.mail.ru with esmtpa (envelope-from ) id 1rXM2C-00000009Yjs-2Xqy; Tue, 06 Feb 2024 17:02:48 +0300 Date: Tue, 6 Feb 2024 16:58:50 +0300 To: Sergey Bronnikov Message-ID: 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: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD94C460F083DF69F515295F69A3DCCED9A65A8B27103DC31E2182A05F5380850409A2BDF8F5AC56FDD5D1BE6A8D71B10A5136A9A283720406ECBD7E2EA66A30C935E8F1FB5DE347A04 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE74E2C4641A2CB07F2EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378629C75C8EFA8C148638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D859FF25C8A729FE1DF193BE80E624DA14F8F3944379301805CC7F00164DA146DAFE8445B8C89999728AA50765F790063783E00425F71A4181389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8EDCF5861DED71B2F389733CBF5DBD5E9B5C8C57E37DE458B9E9CE733340B9D5F3BBE47FD9DD3FB595F5C1EE8F4F765FCF1175FABE1C0F9B6E2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BB9CEE4F2B4A90F8475ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A59A30A20BD345D7225002B1117B3ED696D31B710997BB8547715D9AB585B0EB04823CB91A9FED034534781492E4B8EEAD32941D3B652364A4BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF6C2AE72D65912B6EEF92EEC0AB3143C8FF7AE4A87A9C0166C0916231FEBC4D31EBEAAAAF261D7416807D692F32DC7032377A5E841EF0EF89E38C2E5B25A1A16F5BD4AEEC8ECDED245F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojh/iSjD2txnNaBFCG5HPTUw== X-DA7885C5: B857771CEC66F292F255D290C0D534F920682836F247A52CD9678BCA729AC738C80CE8C4BE2EFCB15B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393590D8C940224AE334323EFE7C075339894A008C30146B0755C3926704B1E4164E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 17/26] 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 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" Hi, Sergey! Thanks for the review! Fixed your comments below. On 05.02.24, Sergey Bronnikov wrote: > Hi, Sergey > > thanks for the patch! LGTM with minor comments > > On 1/29/24 13:45, Sergey Kaplun wrote: > > -do > > - assert(ffi.sizeof("foo1_t") == 12) > > - local cd = ffi.new("foo1_t") > > +do --- foo1_new_t > > test desc says nothing about what test tests. > > I would rename to something like "ffi.sizeof with custom struct" Renamed as the following: =================================================================== diff --git a/test/LuaJIT-tests/lib/ffi/ffi_new.lua b/test/LuaJIT-tests/lib/ffi/ffi_new.lua index 17578995..ec18e324 100644 --- a/test/LuaJIT-tests/lib/ffi/ffi_new.lua +++ b/test/LuaJIT-tests/lib/ffi/ffi_new.lua @@ -10,7 +10,7 @@ void *malloc(size_t size); void free(void *ptr); ]]) -do --- new_foo1_t +do --- ffi.sizeof with custom struct new_foo1_t assert(ffi.sizeof("new_foo1_t") == 12) local cd = ffi.new("new_foo1_t") assert(ffi.sizeof(cd) == 12) @@ -20,7 +20,7 @@ do --- new_foo1_t assert(ffi.sizeof(cd) == 12) end -do --- new_foo2_t +do --- ffi.sizeof with custom struct new_foo2_t assert(ffi.sizeof("new_foo2_t", 3) == 12) local cd = ffi.new("new_foo2_t", 3) assert(ffi.sizeof(cd) == 12) @@ -57,14 +57,14 @@ do --- aligned structure GC assert(nc < oc * 10, "GC step missing for ffi.new") end -do --- VLA +do --- VLA initialization local t = {} for i=1,100 do t[i] = ffi.new("int[?]", i) end assert(ffi.sizeof(t[100]) == 400) for i=0,99 do assert(t[100][i] == 0) end end -do --- VLS +do --- VLS initialization local t = {} local ct = ffi.typeof("struct { double x; int y[?];}") for i=1,100 do t[i] = ct(i) end =================================================================== > > same below > > > + assert(ffi.sizeof("foo1_new_t") == 12) > > jit_complex.lua -- Best regards, Sergey Kaplun