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 CC4BEA6A7D4; Thu, 1 Feb 2024 19:07:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CC4BEA6A7D4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1706803640; bh=cEkoUM3/c/erFsp1BMbeZc1Y7vooByV2p3zoGVs8Pfc=; 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=V42FE4jBjWcw+G1fEnVl62WNnOoqB1NiiEa70Ebum19JYOc9x/9WAm6Q2lapJNYU+ s1mFMdClZGFajS5NTq1T8bLhbTzQJiJ1lOvy8QI+ymkCWRFL1beWuh3larXrAUkUAY 9xFuIUH/tLuFpDaC34z+G2jX970DQB4fjL3zQQuk= Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [95.163.41.83]) (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 6F16DA6A7C1 for ; Thu, 1 Feb 2024 19:07:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6F16DA6A7C1 Received: by smtp45.i.mail.ru with esmtpa (envelope-from ) id 1rVZaw-00000008ERF-3ezM; Thu, 01 Feb 2024 19:07:19 +0300 Message-ID: <08b97215-1cf8-4d4c-9767-352f402ecedb@tarantool.org> Date: Thu, 1 Feb 2024 19:07:18 +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: <5f4bb19f9ab035c79089802fcc99ec7c5550b455.1706520765.git.skaplun@tarantool.org> In-Reply-To: <5f4bb19f9ab035c79089802fcc99ec7c5550b455.1706520765.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: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9010253A383FA2A75EC10F0AB1B4222799CE513510794B992182A05F538085040F6FD396592DF8D10C7A4B249DE6549FDFC35FC896218A3A7BBCBD0CDED06F3520B379AF87BB1B6F5 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F5B0FEFE70B13B25EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374C1E21D5B12C874B8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D891B7599C3A9FA62ECAACB8C2FAD80713B8073FE62C76BAFBCC7F00164DA146DAFE8445B8C89999728AA50765F7900637F924B32C592EA89F389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC82FFDA4F57982C5F4F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CBFD98ABA943BD70BAD7EC71F1DB884274AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C394E153B0E57508E5BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CFE478A468B35FE7671DD303D21008E298D5E8D9A59859A8B6D082881546D9349175ECD9A6C639B01B78DA827A17800CE74F0F518E68DBD4F843847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5C5DD2B0E9C493BE35002B1117B3ED696483CE76178B1014A1BDDAE3D1EA49BEA823CB91A9FED034534781492E4B8EEAD3B72D73EA5828B68BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFD63C13798C64187C27CE7A1AA06A97F7E678670F25665C8DA3BE6EDFEBD8260A7BCAC92FCA266270BAF4CF3B87E910B1A097C4561A6EEF7F0BF2FF6D33C6E18E574423ED05C9E4145F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojKdLLj0Q7SP+iGnHyRgC4+A== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F2588458CD6C3E70786219CADF237C39DF130474E04FAC18BBC464524FB49A0354D1B7F6645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 10/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 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! LGTM On 1/29/24 13:45, 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()` call and renames the C library in the > `require()` call. Also, it names all subtests and includes the test in > . > > Part of tarantool/tarantool#9398 > --- > test/LuaJIT-tests/lib/ffi/ffi_enum.lua | 11 +++++------ > test/LuaJIT-tests/lib/ffi/index | 1 + > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/test/LuaJIT-tests/lib/ffi/ffi_enum.lua b/test/LuaJIT-tests/lib/ffi/ffi_enum.lua > index e8e40ad0..49c874c7 100644 > --- a/test/LuaJIT-tests/lib/ffi/ffi_enum.lua > +++ b/test/LuaJIT-tests/lib/ffi/ffi_enum.lua > @@ -1,7 +1,7 @@ > > local ffi = require("ffi") > > -dofile("../common/ffi_util.inc") > +local fails = require("common.fails") > > ffi.cdef[[ > typedef enum enum_i { FOO_I = -1, II = 10 } enum_i; > @@ -13,10 +13,9 @@ int call_i_ei(enum_i a) asm("call_i"); > int call_i_eu(enum_u a) asm("call_i"); > ]] > > -local C = ffi.load("../clib/ctest") > - > -do > +local C = ffi.load("ctest") > > +do --- base > local t = ffi.new("enum_i[100]") > for i=0,99 do t[i] = "II" end > for i=0,99 do assert(t[i] == "II") end > @@ -42,14 +41,14 @@ do > for i=0,99 do assert(t[i] ~= u[i]) end > end > > -do > +do --- calls > for i=0,99 do assert(C.call_ei_i(9) == "II") end > for i=0,99 do assert(C.call_eu_i(9) == "UU") end > for i=0,99 do assert(C.call_i_ei("II") == 11) end > for i=0,99 do assert(C.call_i_eu("UU") == 11) end > end > > -do > +do --- cast to bool > local f = ffi.cast("bool (*)(enum_i)", function(e) return e == "II" end) > assert(f("II")) > assert(not f(0)) > diff --git a/test/LuaJIT-tests/lib/ffi/index b/test/LuaJIT-tests/lib/ffi/index > index 5c2be87f..b11e5aa4 100644 > --- a/test/LuaJIT-tests/lib/ffi/index > +++ b/test/LuaJIT-tests/lib/ffi/index > @@ -8,6 +8,7 @@ ffi_call.lua > ffi_callback.lua > ffi_const.lua > ffi_convert.lua > +ffi_enum.lua > istype.lua > jit_array.lua > jit_complex.lua