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 CC240DF15C6; Fri, 6 Dec 2024 10:07:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CC240DF15C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1733468827; bh=2YD4yCPcU+8dFocJEeV3EqtjZxL/uGm+MTu7wynX+gA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=P82BvFJy8hz86bHjwH2PfbOrFjMOVE1uxN1a9/z+zscRNCsNsNA7OgyXGlcKl+GWb i6dFADiPdho96I8HiF4yuUyjT7UxZNj6LU8pSVeoL8V8MYjY1X648HJrC1F+iPbuMj xWmBjW//fFxcxC+sUOMAZV8WBCLEVpbOP/POgBlI= Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 2C1D5DEFD3E for ; Fri, 6 Dec 2024 10:06:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2C1D5DEFD3E Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5cf6f367f97so2480408a12.0 for ; Thu, 05 Dec 2024 23:06:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733468792; x=1734073592; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IiQsu1A4b9d7qdtcviVac2JK+aIOmjiyV+H7w/jqz68=; b=nAcvGJZ5zCFS9PFV5g9B73T1XLc4cBGFFkld4wNSEL/U3JLTzMuGXm9bPp2e8XBV++ s5horW1VdgG3/upScPl4q6X1KHnRGEoph4WVATPWrmNNJcWh6bWzYDKVOCE7MXcPcnv8 moD/bqgLg52Vqco6ECMtPGv27BB+bMUAG00gRqbwUN5zNfWVfEw0fGcemdujpblihcvD eHMibE4S9jnZudyqV9LWELDNeBDBeVq3o7XyIYnjunh4+LQC7mllYu2W2Az2VrnSkNxC J5SQ+kJma4lwQt0HKQirKZET7DOn+OaqCk1T9qeWAsUHaUEPFh+VkgU/f2X5yN11iUvD eKnw== X-Gm-Message-State: AOJu0Yz2aOGMoDtNdz9tdjWqakpsTxgOeJBvF2/WF1aP2Ru1GD9Sq/mi mAHcgnQMLjoZmElVL7cbmVNbqIaLzbScUzw5goBmyRXdYghgxF2xvXwMhmb0 X-Gm-Gg: ASbGncuTABNrc+kbBw59xMtB/hIJyJPyliu5Q11XnQDpnEgVN7t6IONslTusnEcwCuT I0uvr6rQUjyGUh10JIV4lkSudCdq+nVZEznvHi+YbNwK7B3s2rlO/lWwRtZX8xNmVxB07YsP9iy H8WVQFaYpPsFXAcQFg3/FMy/7E4eI+2+G8OaukNeNIo7Etrcjw6VOd3ZfZ/YYZEvv0JWIFOzcbH CeTFIzkru9sO7HnEwbjK52lEhhbWx+byrljCEly X-Google-Smtp-Source: AGHT+IGQohpI78BeO5uNpEinR0wBRhkFBnUdHe+nAeWwCAhUjub8c54UscsyJpBy9aPB7OAAMIQYrA== X-Received: by 2002:a05:6402:3715:b0:5d3:ba97:527e with SMTP id 4fb4d7f45d1cf-5d3be75a8f8mr1878959a12.25.1733468791718; Thu, 05 Dec 2024 23:06:31 -0800 (PST) Received: from localhost ([5.181.62.98]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d3bc829433sm759066a12.38.2024.12.05.23.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2024 23:06:30 -0800 (PST) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , Maxim Kokryashkin Date: Fri, 6 Dec 2024 10:06:23 +0300 Message-Id: <91c8ea2686bf2d89322d74b15dcd4eb8b8eb97f8.1733468484.git.sergeyb@tarantool.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov LuaJIT has a macro LUAJIT_DISABLE_SYSPROF that disable sysprof support. Sysprof tests doesn't respect this macro and therefore some of them failed when macro is enabled. The proposed patch: - skip sysprof testcases in a suite tarantool-c-tests - introduce an environment variable LUAJIT_DISABLE_SYSPROF in a suite tarantool-tests that set to 1 when sysprof support is disabled - propagate a status of sysprof support to Lua tests and skip testing when sysprof is disabled --- 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)"); +#else /* LUAJIT_DISABLE_SYSPROF */ const struct test_unit tgroup[] = { test_unit_def(test_tostring_call), }; return test_run_group(tgroup, NULL); +#endif /* 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)"); +#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, }) 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