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 5340299D1D3; Wed, 24 Jan 2024 14:10:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5340299D1D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1706094610; bh=/tqc/tZ3WgYTv48hFl9LJlw6O1ADt3vMXMqiMN45V3E=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RGzY/33MAT1KEqAUPa/VOcGAgNlWaHT/HIs4w2VpjaIyQ4ZnaX0QZniVROq+nn5Js sKtvC0wVV8HTa63q2unrKqzI0jXwzmZvX6mjB0TCXKkLMSa8sCO3FMSDZAx5IjcMzO 5m+zY+hCctVcNQSObVdkkEl0zNopWT+m4Rv4ozNY= Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [95.163.41.88]) (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 2E7EF32B7C1 for ; Wed, 24 Jan 2024 14:10:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2E7EF32B7C1 Received: by smtp52.i.mail.ru with esmtpa (envelope-from ) id 1rSb8v-001aEt-24; Wed, 24 Jan 2024 14:10:08 +0300 Date: Wed, 24 Jan 2024 14:05:52 +0300 To: Sergey Bronnikov , tarantool-patches@dev.tarantool.org 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: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD96A58C36AA2E9964927F1030B6AB50A62FE110DC76F1B75F1182A05F538085040B46F8419FE3D2FD24B5FD86C29EA09936A1B12B33F61BB7261E86584F77A2ACF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE743AE26858062A689EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F08BD7C3AB07DC7F8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8859C2A60091471A599FEEBDFA8468D2A117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18CB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE0AC5B80A05675ACD9935A1E27F592749D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3F8BD4E506CFA3D88C0837EA9F3D19764C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C062BEEFFB5F8EA3E2E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F616AD31D0D18CD5C57739F23D657EF2BB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5C352252418A6BD317F096E3259003B7251AA1021F38D39E3F87CCE6106E1FC07E67D4AC08A07B9B06089696B24BB1D19CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34E69981C39E7B068A2EF8C7892AB50E3163D9E697C892B9BFD17D1DEDEAF6A7507DF37729B0EF4A8C1D7E09C32AA3244CB5DA0F82D361B46CC3EB3A12E8E3A7347101BF96129E40113A1A83191EB2B8F05DA084F8E80FEBD3202CD0F03380D9577A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGSQVxX8i/5Wn7TeOVTyk4Q== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A769DC002722DE7E47274B5FD86C29EA0993816609AA8FC7A761DEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, again! On 23.01.24, Sergey Kaplun via Tarantool-patches wrote: > 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. We discussed offline adding the additional padding to make the result more readable. Like the following: | call(-42.5, 17.125, ... ) == | -42.5 + 17.125 + ... I'll fix this in the next patchset version. > > > > > > > > > + 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 -- Best regards, Sergey Kaplun