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 B6EB49E35F9; Tue, 6 Feb 2024 14:58:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B6EB49E35F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1707220720; bh=sQOXM+8SS4pY0SrD23ulQHNHtvH7lhx+M92naRexoMQ=; 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=Kea366JNyc7TmkEoZm/5dZBWt5sTEt+wCS4NofqgXId6AObrOqXjToPMghkuwpEKW YT3qvaara7ITCYMpEpo2JrOKwW9fE+ZHXURNK0yA1dePr1ZQiU0fz8L9N+RVJdnE2n xOS8LQQ4Tk40vP9RFF3RM/u+85AONEcC8isYJJFU= Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [95.163.41.90]) (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 6E2BA9E35F9 for ; Tue, 6 Feb 2024 14:58:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6E2BA9E35F9 Received: by smtp53.i.mail.ru with esmtpa (envelope-from ) id 1rXK62-00000004dqS-3GsI; Tue, 06 Feb 2024 14:58:39 +0300 Date: Tue, 6 Feb 2024 14:54:41 +0300 To: Maxim Kokryashkin 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: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD94C460F083DF69F51B9726ADA31168F4196B22ED51EBCAFDA182A05F5380850403D8250DDF250D3F3D4FF92D56319F197E88FEB94C43B5F1A5F9D5C2F9395064C58574C2FEBD6103D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B4F69EC2502AC40EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063750DEB490C003C9A78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8011E199BE4E8E46A1492FC0944AD8929BD9209016147CA44CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F924B32C592EA89F389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC82FFDA4F57982C5F4F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE33AC447995A7AD181150BA43C84913FC3A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7350555CCFDA08FA3FAC4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5B54C98C45C5B59CD5002B1117B3ED696A38A8BF854473EEDA13BD6A4B0E00B96823CB91A9FED034534781492E4B8EEAD32941D3B652364A4BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF74D7E708DFAA728BE8971E9A45E5458ED1D0A2C59606A8EAAD697C020CD24DC70070534DE2CB11AA807D692F32DC7032B0B1B5014E61D81B24B42CFEC09099FBCECBBDD7D15939635F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojh/iSjD2txnNZoMuYsTJAWQ== X-DA7885C5: 2F43467CA10DEBA9F255D290C0D534F9E6BA924FF6494757AC10B0CE9716F9F7288E30A7E01B0CAC5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393590D8C940224AE33CDC4D892EC89FDA766E5273EA843E49E5798AA70820AA3EBE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 05/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, Maxim! Thanks for the review! Fixed your comment and force-pushed the branch. On 31.01.24, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > LGTM, except for the single nit below. > > On Mon, Jan 29, 2024 at 01:45:05PM +0300, Sergey Kaplun wrote: > > This patch removes unused `dofile()`. Also, it names the only one test > > as "misc" and includes the test in . > > > > Part of tarantool/tarantool#9398 > > --- | test: enable in LuaJIT-tests | | This patch removes unused `dofile()`. Also, it splits the test case into | several and includes the test in . | | Part of tarantool/tarantool#9398 > > test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua | 4 +--- > > test/LuaJIT-tests/lib/ffi/index | 1 + > > 2 files changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua b/test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua > > index cd0b1815..fa74e45d 100644 > > --- a/test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua > > +++ b/test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua > > @@ -1,8 +1,6 @@ > > local ffi = require("ffi") > > > > -dofile("../common/ffi_util.inc") > > - > > -do > > +do --- misc > Nit: Maybe `misc bitfield tests` then for it to be more elaborate? > Or maybe it should be spplitted according to the sections inside the > test. I've prefered to split this test into several. See the iterative patch below. =================================================================== diff --git a/test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua b/test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua index fa74e45d..e8efc82c 100644 --- a/test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua +++ b/test/LuaJIT-tests/lib/ffi/ffi_bitfield.lua @@ -1,17 +1,16 @@ local ffi = require("ffi") -do --- misc - local x = ffi.new([[ - union { - uint32_t u; - struct { int a:10,b:10,c:11,d:1; }; - struct { unsigned int e:10,f:10,g:11,h:1; }; - struct { int8_t i:4,j:5,k:5,l:3; }; - struct { _Bool b0:1,b1:1,b2:1,b3:1; }; - } - ]]) +local x = ffi.new([[ + union { + uint32_t u; + struct { int a:10,b:10,c:11,d:1; }; + struct { unsigned int e:10,f:10,g:11,h:1; }; + struct { int8_t i:4,j:5,k:5,l:3; }; + struct { _Bool b0:1,b1:1,b2:1,b3:1; }; + } +]]) - -- bitfield access +do --- bitfield access x.u = 0xffffffff assert(x.a == -1 and x.b == -1 and x.c == -1 and x.d == -1) assert(x.e == 1023 and x.f == 1023 and x.g == 2047 and x.h == 1) @@ -41,8 +40,9 @@ do --- misc assert(x.i == -2 and x.j == -6 and x.k == 1 and x.l == -2) assert(x.b0 == true and x.b1 == true and x.b2 == true and x.b3 == false) end +end - -- bitfield insert +do --- bitfield insert x.u = 0xffffffff x.a = 0 if ffi.abi("le") then @@ -71,8 +71,9 @@ do --- misc else assert(x.u == 0x003ff000) end +end - -- cumulative bitfield insert +do --- cumulative bitfield insert x.u = 0xffffffff if ffi.abi("le") then x.a = -392; x.b = 277; x.c = 291; x.d = 0 @@ -101,6 +102,4 @@ do --- misc else assert(x.u == 0xa0000000) end - end - =================================================================== > > local x = ffi.new([[ > > union { > > uint32_t u; > > diff --git a/test/LuaJIT-tests/lib/ffi/index b/test/LuaJIT-tests/lib/ffi/index > > index 7e046908..8d833107 100644 > > --- a/test/LuaJIT-tests/lib/ffi/index > > +++ b/test/LuaJIT-tests/lib/ffi/index > > @@ -3,6 +3,7 @@ cdata_var.lua > > copy_fill.lua > > err.lua > > ffi_arith_ptr.lua > > +ffi_bitfield.lua > > istype.lua > > jit_array.lua > > jit_complex.lua > > -- > > 2.43.0 > > -- Best regards, Sergey Kaplun