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 C816A25CD66; Tue, 14 Feb 2023 15:45:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C816A25CD66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1676378741; bh=LLBYP5d+FHRxgBWXOMIXE30RQBMHVv8mtpF/6htPCjs=; 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=t6S/2NNNkR3hq0KDCGoi/AAPU1MjlFWz+DLXBfr3aPcAl0tKXDCIzz0XMel+HP4s0 yFixdQ6089eljaTM8cPXHSgYj+JCY6ScOu3chD0acz3POa7O08QWgv8WEoy0BvVK3V FB1O0yLU8whbhpu7W13fcF5DEd6X2nQVGMrn9BKM= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 0A84C6ECCC for ; Tue, 14 Feb 2023 15:45:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0A84C6ECCC Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1pRugl-0000kN-7B; Tue, 14 Feb 2023 15:45:39 +0300 Date: Tue, 14 Feb 2023 15:42:07 +0300 To: Igor Munkin Message-ID: References: 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: 4F1203BC0FB41BD9806C989EC2150E3380C6DFC75C6EE8F43C1995440A46B57D182A05F538085040F38D820FF43C49E0B5ED391E2687271202A940128D194978EC66193A237FDC6E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73A0E02362971E860EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637FA81DCE0280C9CC68F08D7030A58E5AD1A62830130A00468AEEEE3FBA3A834EE7353EFBB55337566BB1E35773839DF59C4F1A75954C8C79493307406E0E73CF5A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7302A6E9DBA3751109FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C314747542773C033F117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637B8F435DEDE9E76EBEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349379E7F8541B6C9A63C2FFB2D0BD06C212CF1D4714C3AF3235E006D689188ABAE542533DF4947B9A1D7E09C32AA3244CE2B23E430EDEE89C7D4DC6CEB3A019AE795D98D676DD64D0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojgB/I+mAIlFH4gSOwANpzMw== X-DA7885C5: B97D591458480F0FCD394757F19FD1FC7B693E19596C27E565A44EC67FEB7FFC262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73933AF1F914F131DBF5F73E2B7E2922B5D08AC5E498A3C7C24E0FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 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: 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, Igor! Thanks for the patch! Please, consider my comment below. On 13.02.23, Igor Munkin wrote: > lua-Harness consider whether JIT is enabled or not in scope of 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 build without compiler support. So if Typo: s/So/So,/ > yields false, the latter case is considered. The condition is fixed to > differ both aforementioned cases the following way: when Typo? s/to differ ... cases the following way/to differ ... cases in the following way/ > yields only compiler status with no flags listing, LuaJIT is built > without compiler; if there is more than one value returned, JIT support > is on aboard. 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 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 > > Part of tarantool/tarantool#8252 > > Signed-off-by: Igor Munkin > --- > test/lua-Harness-tests/403-jit.t | 2 +- > test/lua-Harness-tests/411-luajit.t | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/test/lua-Harness-tests/403-jit.t b/test/lua-Harness-tests/403-jit.t > index 0f986da9..0aa5d367 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 = select('#', jit.status()) > 1 > 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..e3b6c7a8 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 = select('#', jit.status()) > 1 > local has_jutil = pcall(require, 'jit.util') > local has_openresty_listing = profile.openresty or jit.version:match'moonjit' > > -- > 2.30.2 > -- Best regards, Sergey Kaplun