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 2A16ADF788B; Fri, 6 Dec 2024 11:09:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2A16ADF788B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1733472595; bh=s7bKCtJJZva/o3GHjLiNyMeIZ/60MDNxipVGXofCI0U=; 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=K2eyZ4dQpLhUPmbya9c1ZepQO3zw71XihGHNpyD3CJRUSprumloQ/HyqC0gm3ZMbt UNzT6Fnyn/BLef3f3xgCsbxSw2ohGjuPa7ISKM38WbD5alPkgPEoEi+Wzh6z8VO3Ca srddtzeGTGCZoooeiVWs6qFt9p/ujFWiBMuhiWXc= Received: from send81.i.mail.ru (send81.i.mail.ru [89.221.237.176]) (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 7059EDF7880 for ; Fri, 6 Dec 2024 11:09:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7059EDF7880 Received: by exim-smtp-57cd6dcbd5-jc5jd with esmtpa (envelope-from ) id 1tJTPM-00000000HAG-23tN; Fri, 06 Dec 2024 11:09:52 +0300 Date: Fri, 6 Dec 2024 11:08:57 +0300 To: Sergey Bronnikov Message-ID: References: <91c8ea2686bf2d89322d74b15dcd4eb8b8eb97f8.1733468484.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <91c8ea2686bf2d89322d74b15dcd4eb8b8eb97f8.1733468484.git.sergeyb@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9008082F162C50007E40CDF9572C4E2720DE3000521F4C79D182A05F5380850405835BDAE3363EA463DE06ABAFEAF6705BA31DAE182FE337E60139ED7CDEC7E9A05C8B9D5B862C5B4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7922D113DFDC6D5A3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DD7A7F9003AF293F8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D860A3EC8E66A60999D51576F6487E0ADDA05F0F2E8E56B29DCC7F00164DA146DAFE8445B8C89999728AA50765F79006370BDB19F53EE528DD389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8C2B5EEE3591E0D35F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE33AC447995A7AD182BEBFE083D3B9BA73A03B725D353964B2FFDA4F57982C5F435872C767BF85DA227C277FBC8AE2E8BC6A536F79815AD9275ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5C88774A49603C6265002B1117B3ED696E7B9026496F522B869995D676B7B4CBE823CB91A9FED034534781492E4B8EEAD003C2D46C52F18F2BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFFDE2902BED405FAD49001B70B58D6BBC0DF6EB555AFC3D3F3141AFD380E1D555CFC48FC8A09AC855494E10A735AF7C93D9CEC19B6F2D036B015F50B87A0D1EEE6BEBBE7DF4F88A12C226CC413062362A913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojOp8qHLJs/nQa0Wh+O+0t7A== X-DA7885C5: 12DA372D530ACDA0F255D290C0D534F9122679826A4832926E670C9197E421AC6AB576E4C7AFC4475B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F739381B31377CF4CA219171987FBB884F7097A4445F622DC573DFD308C816A0C4362E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/2] test: skip sysprof tests with LUAJIT_DISABLE_SYSPROF 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 patch! LGTM, with a minor comment below. On 06.12.24, Sergey Bronnikov wrote: > From: Sergey Bronnikov > > LuaJIT has a macro LUAJIT_DISABLE_SYSPROF that disable Typo: s/disable/disables/ > sysprof support. Sysprof tests doesn't respect this macro Typo: s/doesn't/don't/ Typo: s/macro/macro,/ > and therefore some of them failed when macro is enabled. Typo: /macro/macro,/ > > The proposed patch: This isn't proposed patch, but it is just patch, so: s/proposed // > > - skip sysprof testcases in a suite tarantool-c-tests Typo: /skip/Skips/ Missed dot at the end of the sentence. > - introduce an environment variable LUAJIT_DISABLE_SYSPROF in Typo: s/introduce/Introduces/ > a suite tarantool-tests that set to 1 when sysprof support is Typo: s/set/is set/ > disabled Missed dot at the end of the sentence. > - propagate a status of sysprof support to Lua tests and skip Typo: s/propagate/Propagates > testing when sysprof is disabled Missed dot at the end of the sentence. > --- > test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c | 4 ++++ > test/tarantool-c-tests/misclib-sysprof-capi.test.c | 4 ++++ > test/tarantool-tests/CMakeLists.txt | 4 ++++ > test/tarantool-tests/profilers/gh-5688-tool-cli-flag.test.lua | 2 ++ > .../profilers/gh-5813-resolving-of-c-symbols.test.lua | 2 ++ > .../gh-7264-add-proto-trace-sysprof-default.test.lua | 2 ++ > .../profilers/gh-9217-profile-parsers-error-handling.test.lua | 2 ++ > test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua | 2 ++ > 8 files changed, 22 insertions(+) > > diff --git a/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c b/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c > index a8de3358..de4fb2c4 100644 > --- a/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c > +++ b/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c > @@ -277,8 +277,12 @@ static int test_tostring_call(void *ctx) > > int main(void) > { > +#if LUAJIT_DISABLE_SYSPROF > + return skip_all("Sysprof is disabled (LUAJIT_DISABLE_SYSPROF)"); Minor: I suppose we can drop the LUAJIT_DISABLE_SYSPROF mentioning since it becomes "maslo maslyanoe", for my taste. Feel free to ignore. > +#else /* LUAJIT_DISABLE_SYSPROF */ > diff --git a/test/tarantool-c-tests/misclib-sysprof-capi.test.c b/test/tarantool-c-tests/misclib-sysprof-capi.test.c > index 6f53d488..ec3354cc 100644 > --- a/test/tarantool-c-tests/misclib-sysprof-capi.test.c > +++ b/test/tarantool-c-tests/misclib-sysprof-capi.test.c > @@ -301,6 +301,9 @@ static int profile_func_jiton(void *test_state) > > int main(void) > { > +#if LUAJIT_DISABLE_SYSPROF > + return skip_all("Sysprof is disabled (LUAJIT_DISABLE_SYSPROF)"); Ditto. > +#else /* LUAJIT_DISABLE_SYSPROF */ > if (LUAJIT_OS != LUAJIT_OS_LINUX) > return skip_all("Sysprof is implemented for Linux only"); > if (LUAJIT_TARGET != LUAJIT_ARCH_X86 > @@ -322,4 +325,5 @@ int main(void) > const int test_result = test_run_group(tgroup, L); > utils_lua_close(L); > return test_result; > +#endif /* LUAJIT_DISABLE_SYSPROF */ > } > diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt > index 8bdb2cf3..a6e39f6c 100644 > --- a/test/tarantool-tests/CMakeLists.txt > +++ b/test/tarantool-tests/CMakeLists.txt > @@ -89,6 +89,10 @@ if(LUAJIT_ENABLE_TABLE_BUMP) > list(APPEND LUA_TEST_ENV_MORE LUAJIT_TABLE_BUMP=1) > endif() > > +if(LUAJIT_DISABLE_SYSPROF) > + list(APPEND LUA_TEST_ENV_MORE LUAJIT_DISABLE_SYSPROF=1) > +endif() > + > set(TEST_SUITE_NAME "tarantool-tests") > > # XXX: The call produces both test and target > diff --git a/test/tarantool-tests/profilers/gh-5688-tool-cli-flag.test.lua b/test/tarantool-tests/profilers/gh-5688-tool-cli-flag.test.lua > index f935dc5b..379ccf8e 100644 > --- a/test/tarantool-tests/profilers/gh-5688-tool-cli-flag.test.lua > +++ b/test/tarantool-tests/profilers/gh-5688-tool-cli-flag.test.lua > @@ -1,4 +1,5 @@ > local tap = require('tap') > +local no_sysprof = os.getenv('LUAJIT_DISABLE_SYSPROF') > local test = tap.test('gh-5688-tool-cli-flag'):skipcond({ > ['Profile tools are implemented for x86_64 only'] = jit.arch ~= 'x86' and > jit.arch ~= 'x64', > @@ -7,6 +8,7 @@ local test = tap.test('gh-5688-tool-cli-flag'):skipcond({ > ['No profile tools CLI option integration'] = _TARANTOOL, > -- See also https://github.com/LuaJIT/LuaJIT/issues/606. > ['Disabled due to LuaJIT/LuaJIT#606'] = os.getenv('LUAJIT_TABLE_BUMP'), > + ['Disabled due to LUAJIT_DISABLE_SYSPROF'] = no_sysprof, Minor: "disabled due to disable" sounds like "maslo maslyanoe" for my taste. I suppose "Sysprof is disabled" is just enough. As a minor bonus, we may avoid the declaration of the `no_sysprof` variable since we can just use one-line `os.getenv()` that fits into this line now. Same for the other Lua tests. > }) > > test:plan(3) > diff --git a/test/tarantool-tests/profilers/gh-5813-resolving-of-c-symbols.test.lua b/test/tarantool-tests/profilers/gh-5813-resolving-of-c-symbols.test.lua > index 74bcd9e8..ff745225 100644 > --- a/test/tarantool-tests/profilers/gh-5813-resolving-of-c-symbols.test.lua > +++ b/test/tarantool-tests/profilers/gh-5813-resolving-of-c-symbols.test.lua > @@ -1,10 +1,12 @@ > local tap = require("tap") > +local no_sysprof = os.getenv("LUAJIT_DISABLE_SYSPROF") > local test = tap.test("gh-5813-resolving-of-c-symbols"):skipcond({ > ["Memprof is implemented for x86_64 only"] = jit.arch ~= "x86" and > jit.arch ~= "x64", > ["Memprof is implemented for Linux only"] = jit.os ~= "Linux", > -- See also https://github.com/LuaJIT/LuaJIT/issues/606. > ["Disabled due to LuaJIT/LuaJIT#606"] = os.getenv("LUAJIT_TABLE_BUMP"), > + ["Disabled due to LUAJIT_DISABLE_SYSPROF"] = no_sysprof, > }) > > test:plan(5) > diff --git a/test/tarantool-tests/profilers/gh-7264-add-proto-trace-sysprof-default.test.lua b/test/tarantool-tests/profilers/gh-7264-add-proto-trace-sysprof-default.test.lua > index 176c1a15..e09016e7 100644 > --- a/test/tarantool-tests/profilers/gh-7264-add-proto-trace-sysprof-default.test.lua > +++ b/test/tarantool-tests/profilers/gh-7264-add-proto-trace-sysprof-default.test.lua > @@ -1,4 +1,5 @@ > local tap = require('tap') > +local no_sysprof = os.getenv('LUAJIT_DISABLE_SYSPROF') > local test = tap.test('gh-7264-add-proto-trace-sysprof-default'):skipcond({ > ['Test requires JIT enabled'] = not jit.status(), > ['Sysprof is implemented for x86_64 only'] = jit.arch ~= 'x86' and > @@ -6,6 +7,7 @@ local test = tap.test('gh-7264-add-proto-trace-sysprof-default'):skipcond({ > ['Sysprof is implemented for Linux only'] = jit.os ~= 'Linux', > -- See also https://github.com/LuaJIT/LuaJIT/issues/606. > ['Disabled due to LuaJIT/LuaJIT#606'] = os.getenv('LUAJIT_TABLE_BUMP'), > + ['Disabled due to LUAJIT_DISABLE_SYSPROF'] = no_sysprof, > }) > > test:plan(2) > diff --git a/test/tarantool-tests/profilers/gh-9217-profile-parsers-error-handling.test.lua b/test/tarantool-tests/profilers/gh-9217-profile-parsers-error-handling.test.lua > index 65c51198..012b1501 100644 > --- a/test/tarantool-tests/profilers/gh-9217-profile-parsers-error-handling.test.lua > +++ b/test/tarantool-tests/profilers/gh-9217-profile-parsers-error-handling.test.lua > @@ -1,4 +1,5 @@ > local tap = require('tap') > +local no_sysprof = os.getenv('LUAJIT_DISABLE_SYSPROF') > local test = tap.test('gh-9217-profile-parsers-error-handling'):skipcond({ > ['Profile tools are implemented for x86_64 only'] = jit.arch ~= 'x86' and > jit.arch ~= 'x64', > @@ -7,6 +8,7 @@ local test = tap.test('gh-9217-profile-parsers-error-handling'):skipcond({ > ['No profile tools CLI option integration'] = _TARANTOOL, > -- See also https://github.com/LuaJIT/LuaJIT/issues/606. > ['Disabled due to LuaJIT/LuaJIT#606'] = os.getenv('LUAJIT_TABLE_BUMP'), > + ['Disabled due to LUAJIT_DISABLE_SYSPROF'] = no_sysprof, > }) > > jit.off() > diff --git a/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua b/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > index 26c277cd..ea5ca9a9 100644 > --- a/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > +++ b/test/tarantool-tests/profilers/misclib-sysprof-lapi.test.lua > @@ -1,10 +1,12 @@ > local tap = require("tap") > +local no_sysprof = os.getenv('LUAJIT_DISABLE_SYSPROF') > local test = tap.test("misc-sysprof-lapi"):skipcond({ > ["Sysprof is implemented for x86_64 only"] = jit.arch ~= "x86" and > jit.arch ~= "x64", > ["Sysprof is implemented for Linux only"] = jit.os ~= "Linux", > -- See also https://github.com/LuaJIT/LuaJIT/issues/606. > ["Disabled due to LuaJIT/LuaJIT#606"] = os.getenv("LUAJIT_TABLE_BUMP"), > + ["Disabled due to LUAJIT_DISABLE_SYSPROF"] = no_sysprof, > }) > > test:plan(19) > -- > 2.34.1 > -- Best regards, Sergey Kaplun