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 0C8243048DE; Tue, 28 Feb 2023 22:06:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0C8243048DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1677611204; bh=qGd1BRo9QukPeaAarb8rzaMhT9MEQLKSepH5XoGGuEg=; 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=qQnSuJPuc0Ghtf2BQeAs9tC4vnTENhW6MP7qn/gCier+SOmec+uN1pRJWFzAO5NWp BO1NJScwdJG7aV1jT9G9xbO9hk9o5mQyqTfPxgozkaKUk3wqDHfNLtUk6mc6bw5Mdr StdJwydnU0AlhOcpo2M2iMc0k1ToDILXX7zmFuGI= Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [95.163.41.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4C36B3048DE for ; Tue, 28 Feb 2023 22:04:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4C36B3048DE Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1pX5HK-0024l0-GZ; Tue, 28 Feb 2023 22:04:46 +0300 Date: Tue, 28 Feb 2023 19:01:54 +0000 To: Sergey Kaplun Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9CCAB0EF48C080D7072F6E3C5C1B55D6C1FF4D4E6DB31AEAA182A05F538085040A631084DD099361E9999249597CB698C5A0B0C7FBFF95649064B2DD935751C26 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79EDB57D1FB735487EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637829D9538242026C38638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82FFA6C4D00356D1A56CC2505C8CA0BE5117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCC109CDBF71E2B98BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B28585415E75ADA9F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEFAD5A440E159F97D9F804269016115C9D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3F8BD4E506CFA3D889735652A29929C6CC4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637A7EFCB0EB5ACB161EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34ECB3E21D3CD9CB4FF24C66BFA7D7D0BDE48C05A0417C8C02E07B6C017BAD0AFB01564F9B243F914D1D7E09C32AA3244C6E0BAA81CC229835C5D4AE96A227C1B063871F383B54D9B3927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMN6DA1mNzI/TGwCA3KB5Cw== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531FBFE2EABCEB21FC3F237AC2CC53D5D7496547CDA4659D45D2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 6/7] test: fix lua-Harness JIT-related 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Thanks for your review! I've fixed both typos in commit message and added the new patch at the bottom. On 14.02.23, Sergey Kaplun wrote: > Hi, Igor! > Thanks for the patch! > Please, consider my comment below. > > On 13.02.23, Igor Munkin wrote: > > I afraid that this check isn't fully correct either: > `jit.status()` yields CPU-specific flags and JIT optimization flags. > For ARM64 the subset of CPU-specific flags is empty. Hence, if someone > runs the tests with `jit.opt.start(0)` to disable all JIT optimization > this check will return false for LuaJIT compiled with JIT. > > | $ src/luajit -e 'jit.opt.start(0) print(jit.arch, jit.status(), select("#", jit.status()) > 1)' > | arm64 true false > Ouch, you're right. I've fixed the issue the way you suggested below. > Also, I found the easier way to check `LJ_HASJIT` is set or not. > We can simply check the existance of `jit.opt` module: > > | $ src/luajit -e 'print(jit.opt)' > | nil > > > -- > > 2.30.2 > > > > -- > Best regards, > Sergey Kaplun Here is the new patch: ================================================================================ test: fix lua-Harness JIT-related tests lua-Harness considers whether JIT is enabled or not in the scope of the 403-jit.t and 411-luajit.t tests. However, the original condition is wrong, since yields false for both cases, when JIT is just turned off and when LuaJIT is built without compiler support. So, if yields false, the latter case is considered. The condition is fixed to differ both aforementioned cases in the following way: when jit.opt is nil, LuaJIT is built without compiler; otherwise, JIT support is on board. Part of tarantool/tarantool#8252 diff --git a/test/lua-Harness-tests/403-jit.t b/test/lua-Harness-tests/403-jit.t index 0f986da9..1a88564b 100755 --- a/test/lua-Harness-tests/403-jit.t +++ b/test/lua-Harness-tests/403-jit.t @@ -31,7 +31,7 @@ if not jit then skip_all("only with LuaJIT") end -local compiled_with_jit = jit.status() +local compiled_with_jit = jit.opt ~= nil local luajit20 = jit.version_num < 20100 and not jit.version:match'RaptorJIT' local has_jit_opt = compiled_with_jit local has_jit_security = jit.security diff --git a/test/lua-Harness-tests/411-luajit.t b/test/lua-Harness-tests/411-luajit.t index 3a9a7b8f..6cfd6837 100755 --- a/test/lua-Harness-tests/411-luajit.t +++ b/test/lua-Harness-tests/411-luajit.t @@ -37,7 +37,7 @@ if not pcall(io.popen, lua .. [[ -e "a=1"]]) then skip_all("io.popen not supported") end -local compiled_with_jit = jit.status() +local compiled_with_jit = jit.opt ~= nil local has_jutil = pcall(require, 'jit.util') local has_openresty_listing = profile.openresty or jit.version:match'moonjit' ================================================================================ -- Best regards, IM