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 CE90A9E9856; Tue, 6 Feb 2024 16:43:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CE90A9E9856 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1707227016; bh=0DAGNl6nhBnruNnfHdnpvNdROxInyTHqKC8Uzpn8Alc=; 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=Nggapth2rnUh9NnV6Rz3cGBRS+nUMZrPyWe9Ri0DXkRVWuf0wbLtZ3XqCYvtIbn81 gBfUaCOfVBP1nWSZGcLze8Z3q3CaxCLuq3COOuDoH8y9ErF52C0rFj/vmrp3OV4wj3 1VVYXANPoaF84Jp5mYNx7LlzUsPtQp+pIaHB/DwI= Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [95.163.41.72]) (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 833F49E9859 for ; Tue, 6 Feb 2024 16:43:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 833F49E9859 Received: by smtp31.i.mail.ru with esmtpa (envelope-from ) id 1rXLjY-00000006mxF-0f6A; Tue, 06 Feb 2024 16:43:32 +0300 Date: Tue, 6 Feb 2024 16:39:34 +0300 To: Maxim Kokryashkin Message-ID: References: <762aa9e5928117192f7fc9f1c5df0f6d5f478fbe.1706520765.git.skaplun@tarantool.org> 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: 4F1203BC0FB41BD94C460F083DF69F5190553CFE4D3947DFB7946331AD157781182A05F53808504002604D835AE79C482EB5D77EF37489D13DAB75D14C536AE916FBF428892A7DDA7A2D8C9EC3405942 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7627B7646117F0BF3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063771C846A5973DEE7E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D881A59144FA141EDCE24230C94C46AE77055F6078035719E7CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F924B32C592EA89F389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC82FFDA4F57982C5F4F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE33AC447995A7AD182BEBFE083D3B9BA73A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735B17145F0B7815491C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5D322C38373E769995002B1117B3ED696C7130981A7FC341EB48B7A7F94616420823CB91A9FED034534781492E4B8EEADD8DFB5E8F7680678 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF184394C3EDB6D8A16F2704B73ED51D62EAF929EF446F5A50207B9383E6BF7E4AAE7801A017AB3E4A807D692F32DC7032E485745251D37E968DB8DD49A72755CC3046221A32D38B0D5F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojh/iSjD2txnOXQi7WJLblwA== X-DA7885C5: 3D5030046C7C24D3F255D290C0D534F9B9D7257D9DECCD62B7B5DF72D8777432CF8EB12EA310553F5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393590D8C940224AE33B7209A0AB0712309FDB912CA4FC2CE540D4DF981A062D473E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 15/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! On 01.02.24, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > Please consider two comments below. Renamed the test cases as the following: =================================================================== diff --git a/test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua b/test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua index ca6c65c5..87ec2722 100644 --- a/test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua +++ b/test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua @@ -14,7 +14,7 @@ local function checklex(t) end end -do --- checklex +do --- correct 64-bit integers and complex numbers parsing checklex{ "0LL", "0ll", "0LL", "0LL", @@ -39,7 +39,7 @@ do --- checklex } end -do --- checkfail +do --- incorrect format for 64-bit integers and complex numbers checkfail({ "0l", "0lll", =================================================================== > > On Mon, Jan 29, 2024 at 01:45:15PM +0300, Sergey Kaplun wrote: > > This patch changes the `dofile()` (which uses an unreliable relative > > file path and mutates `_G` with global functions to be defined) to the > > corresponding `require()`. Also, it adds groups with the names of > > subtests and enables the test in . > > > > Part of tarantool/tarantool#9398 > > --- > > test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua | 72 +++++++++++--------- > > test/LuaJIT-tests/lib/ffi/index | 1 + > > 2 files changed, 39 insertions(+), 34 deletions(-) > > > > diff --git a/test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua b/test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua > > index e26650ef..ca6c65c5 100644 > > --- a/test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua > > +++ b/test/LuaJIT-tests/lib/ffi/ffi_lex_number.lua > > @@ -1,6 +1,6 @@ > > local ffi = require("ffi") > > > > -dofile("../common/ffi_util.inc") > > +local checkfail = require("common.ffi.checkfail") > > > > local function checklex(t) > > for i=1,1e9,2 do > > @@ -14,38 +14,42 @@ local function checklex(t) > > end > > end > > > > -checklex{ > > - "0LL", "0ll", > > - "0LL", "0LL", > > - "0ULL", "0ull", > > - "0ULL", "0ULl", > > - "18446744073709551615ULL", "18446744073709551615llu", > > - "9223372036854775807LL", "0x7fffffffffffffffll", > > - "9223372036854775808ULL", "0x8000000000000000ull", > > - "1311768467463790320LL", "0x123456789abcdef0ll", > > - "-1LL", "-1ll", > > - "18446744073709551615ULL", "-1ull", > > - "-9223372036854775807LL", "-0x7fffffffffffffffll", > > - "9223372036854775808ULL", "-0x8000000000000000ull", > > - "0+0i", "0i", > > - "0+0i", "0I", > > - "0+12.5i", "12.5i", > > - "0+4660i", "0x1234i", > > - "0+infI", "1e400i", > > - "0-infI", "-1e400i", > > - "0-12.5i", "-12.5i", > > - "0-0i", "-0i", > > -} > > +do --- checklex > Maybe we can come up with a more elaborate name? > > + checklex{ > > + "0LL", "0ll", > > + "0LL", "0LL", > > + "0ULL", "0ull", > > + "0ULL", "0ULl", > > + "18446744073709551615ULL", "18446744073709551615llu", > > + "9223372036854775807LL", "0x7fffffffffffffffll", > > + "9223372036854775808ULL", "0x8000000000000000ull", > > + "1311768467463790320LL", "0x123456789abcdef0ll", > > + "-1LL", "-1ll", > > + "18446744073709551615ULL", "-1ull", > > + "-9223372036854775807LL", "-0x7fffffffffffffffll", > > + "9223372036854775808ULL", "-0x8000000000000000ull", > > + "0+0i", "0i", > > + "0+0i", "0I", > > + "0+12.5i", "12.5i", > > + "0+4660i", "0x1234i", > > + "0+infI", "1e400i", > > + "0-infI", "-1e400i", > > + "0-12.5i", "-12.5i", > > + "0-0i", "-0i", > > + } > > +end > > > > -checkfail({ > > - "0l", > > - "0lll", > > - "0u", > > - "0ul", > > - "0ulll", > > - "0wll", > > - "0xll", > > - ".0ll", > > - "0ii", > > -}, function(s) assert(loadstring("return "..s)) end) > > +do --- checkfail > Same here. > > + checkfail({ > > + "0l", > > + "0lll", > > + "0u", > > + "0ul", > > + "0ulll", > > + "0wll", > > + "0xll", > > + ".0ll", > > + "0ii", > > + }, function(s) assert(loadstring("return "..s)) end) > > +end > > > > diff --git a/test/LuaJIT-tests/lib/ffi/index b/test/LuaJIT-tests/lib/ffi/index > > index 71def57b..833c31e3 100644 > > --- a/test/LuaJIT-tests/lib/ffi/index > > +++ b/test/LuaJIT-tests/lib/ffi/index > > @@ -13,6 +13,7 @@ ffi_gcstep_recursive.lua > > ffi_jit_arith.lua > > ffi_jit_call.lua > > ffi_jit_conv.lua > > +ffi_lex_number.lua > > istype.lua > > jit_array.lua > > jit_complex.lua > > -- > > 2.43.0 > > -- Best regards, Sergey Kaplun