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 D04C5988B6C; Tue, 23 Jan 2024 15:50:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D04C5988B6C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1706014232; bh=FfFAlCfKpvmy39N7YzAr9UVKJcgM6KyyAII62OtSt2c=; 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=OhgUB9be+ld8Tuk7dmBpb8NKyVj4LGf1/3UE33cgqbMzxeavKXMoBQ47cwRqx8H2k UvNDLZivdyrDIFb81scsXkKy2ulAGt3sm2f4zjsG83Ar3ysFPxNYPycWoTtSPNh5wW USCGiKTkwvd4btUPeL8z7LummOul6q8LDtnJo9J8= Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [95.163.41.81]) (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 2E347988B40 for ; Tue, 23 Jan 2024 15:50:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2E347988B40 Received: by smtp40.i.mail.ru with esmtpa (envelope-from ) id 1rSGEY-00GeZY-1O; Tue, 23 Jan 2024 15:50:30 +0300 Date: Tue, 23 Jan 2024 15:46:17 +0300 To: Sergey Bronnikov Message-ID: References: <6785a95ee05ea262eff6226bc7867c9280ea37ea.1705661401.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: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD936B5060B5AFFD5314D27A80ED572B8C33F567EA69625D425182A05F538085040F0374B23EC26DD1CFD911C461CA85146AE34960AA535B2EF9781CE9DFDB48C9B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE705B093C0FC4B30B9EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006376976B91E969631F08638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82E56AFC79562D0276B23C5E067FEF7F8117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18CB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269176DF2183F8FC7C0FE3A47D6FA29121068655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C8BDE37D78FCB031643847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5DDAA824FAA5F11588E2D8098DD5A9D486E5394035A5404F6F87CCE6106E1FC07E67D4AC08A07B9B07AE820D2C17D0E56CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34BD150993ED26DDF4EAB3CEC189498BFA7C285472187325F7CAEE7696C0F84047A52B11AA3B6719971D7E09C32AA3244CA2E2CFA4FD92ED01AD317C044536312E64EE5813BBCA3A9D85A42E4C463514DC5DA084F8E80FEBD3202CD0F03380D9577A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGSQVxX8i/5V7cXS0ayY18w== X-DA7885C5: 08E56834722F5CBF72B0EC5350D67C790D17C6D901785C2DB80240B5F1878058262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F7393590D8C940224AE3393E030BDDC82875D9B080D687858B75B0FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 05/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 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! Please consider my answers below. On 23.01.24, Sergey Bronnikov wrote: > Hi, Sergey! > > thanks for the patch! > > please take a look on my comments > > > Sergey > > On 1/19/24 14:32, Sergey Kaplun wrote: > > This patch removes unused `dofile()`. Also, it uses the basename of the > > ctest library to be loaded via ffi. It adds groups with names of > > subtests and enables the test in . Complex type is undefined on > > Windows, so the correponding tests are not enabled for this platform. > > Fastcalls are enabled only for the x86 architecture. Stdcalls are > > enabled only for Windows on x86. Tests with calls with 10 arguments with > > sizes less than 8 bits are dummy for M1. This suite lacks a mechanism to > > skip subtests satisfying complicated conditions, so it is done manually > > by the corresponding `if` check. > > > > Part of tarantool/tarantool#9398 > > --- > > test/LuaJIT-tests/lib/ffi/ffi_call.lua | 180 +++++++++++++------------ > > test/LuaJIT-tests/lib/ffi/index | 1 + > > 2 files changed, 92 insertions(+), 89 deletions(-) > > > > diff --git a/test/LuaJIT-tests/lib/ffi/ffi_call.lua b/test/LuaJIT-tests/lib/ffi/ffi_call.lua > > index 1eb5e906..c362f3e0 100644 > > --- a/test/LuaJIT-tests/lib/ffi/ffi_call.lua > > +++ b/test/LuaJIT-tests/lib/ffi/ffi_call.lua > > @@ -1,8 +1,5 @@ > > - > > + > > +do --- call 10 args > > + if not (jit.os == "OSX" and jit.arch == "arm64") then -- NYI > > + assert(C.call_10i(-42, 17, 12345, 9987, -100, 11, 51, 0x12345678, 338, -78901234) == -42+17+12345+9987-100+11+51+0x12345678+338-78901234) > > these tests totally unreadable. > > I would rewrite such tests in the following manner: > > local args = {-42, 17, 12345, 9987, -100, 11, 51, 0x12345678, 338, > -78901234} > > assert(C.call_10i(unpack(args)) == sum(args)) > > where `sum` is a function that sum elements in a passed table. > > (Or even calculate RHS once and use it and doesn't depend on > calculations in runtime.) > > Same comment for other similar tests. Obviously, there is room to improve this suite. But as an agreement before: we don't change the semantics of this tests (like you suggested by introducing the other function `sum()` that may be compiled, for example). Also, we don't refactor the whole test suite. It is not the point of this patchset. This suite is just a good reference that Mike's (or ours) patches don't breake some parts of the LuaJIT. In the future we may reorganise these tests inside our own suite, for example. Now we have no resources for this, unfortunately. > > > > + assert(C.call_10f(-42.5, 17.125, 12345.5, 9987, -100.625, 11, 51, 0x123456, 338, -789012.75) == -42.5+17.125+12345.5+9987-100.625+11+51+0x123456+338-789012.75) > > + end > > + assert(C.call_10d(-42.5, 17.125, 12345.5, 9987, -100.625, 11, 51, 0x12345678, 338, -78901234.75) == -42.5+17.125+12345.5+9987-100.625+11+51+0x12345678+338-78901234.75) > > +end > > > > -do > > +do --- call pointer arg -- Best regards, Sergey Kaplun