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 CB1A1C75CCE; Thu, 15 Aug 2024 15:47:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CB1A1C75CCE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1723726035; bh=dWgZYzGh2MnWhdEGal1B4Pi6O5erLZ41kUWzfiaBzqk=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=pDPmfDSpR1EH53uvmrm/rufcINPGkQ8xOKTJC/ZBGrZ1PcnC2d8apwOWrvxisNkDb E5DLYyDKxbR/Q2NHyE0GzmZ1R4dlaZmz55R0IZEz0zXqrdm40szhtZ3vd2pi9Zt4/Q F4+DE9zDBbqb+O3JMKMo0QA3YwlcvT0VArrzgAXs= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [95.163.41.73]) (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 22EDDC75CCD for ; Thu, 15 Aug 2024 15:47:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 22EDDC75CCD Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1seZsn-000000048vP-1wYl; Thu, 15 Aug 2024 15:47:13 +0300 Content-Type: multipart/alternative; boundary="------------6Wvr0VyKLwrVfUiatdbAUwJr" Message-ID: <7b92a28d-65b9-4322-9d4f-cee73959dbef@tarantool.org> Date: Thu, 15 Aug 2024 15:47:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F97E3C14763C38E29560722C55467F34824B3481C2C8111E182A05F538085040E1F10A8047F5BE30D4FF92D56319F19716DE2304D274EAFE79C1F1751ECA059D12E4582B264BA452 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE790A429F79E911BC3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637369CDFF96C7994428638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8C5C5A8043E386E14847215309F40ECE8CEB7259E38C174ABCC7F00164DA146DAFE8445B8C89999728AA50765F790063783E00425F71A4181389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8C2B5EEE3591E0D35F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C4CB6874B0BCFF0B803F1AB874ED890284AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C3F0685002530F4075BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE71B8D961A28FB0488731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5EDC16E661B04D30B5002B1117B3ED696626E48C223988014D57BAD45EC4C5DE1823CB91A9FED034534781492E4B8EEADA91A6E18C88C5E2F X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D3451BBE684D17D72213F6B1B8D8465C029B3BD55D787F772501A540E5392886B4BFF2387CBE577A7D11D7E09C32AA3244C733FCCD561539E97AB70F9BE574AE9C64F8AF5B8676E514DEA455F16B58544A2557BDE0DD54B3590A5AE236DF995FB59978A700BF655EAEEED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojD5rM0r3KxnGtNvrbGccyRA== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D614067DBB921D813B3329FCE710097BBF5DE71D60A7C1728AB640152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 01/36] test: don't run JIT-based LuaJIT tests without JIT 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" This is a multi-part message in MIME format. --------------6Wvr0VyKLwrVfUiatdbAUwJr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey thanks for the patch, LGTM. See a minor comment below. Sergey On 14.08.2024 16:55, Sergey Kaplun wrote: > Before this patch +jit flag is given to the LuaJIT test suite > unconditionally even when LuaJIT is built as a pure interpreter. > > This patch fixes the behaviour by setting the flag only when > `LUAJIT_DISABLE_JIT` option is not set. > > Needed for tarantool/tarantool#9398 > --- > test/LuaJIT-tests/CMakeLists.txt | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt > index 9fbe9bf5..019762e0 100644 > --- a/test/LuaJIT-tests/CMakeLists.txt > +++ b/test/LuaJIT-tests/CMakeLists.txt > @@ -42,11 +42,15 @@ if(LUAJIT_USE_ASAN) > endif() > endif() > > +if(NOT LUAJIT_DISABLE_JIT) > + list(APPEND LUAJIT_TEST_TAGS_EXTRA +jit) > +endif() > + > if(LUAJIT_NO_UNWIND) > # Test verifies the interoperability with C++ > # ABI exceptions, so it requires external unwinding enabled. > # Hence, skip them otherwise. > - set(LUAJIT_TEST_TAGS_EXTRA +internal_unwinder) > + list(APPEND LUAJIT_TEST_TAGS_EXTRA +internal_unwinder) > endif() > > if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512") > @@ -55,7 +59,7 @@ if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512") > # built with the enabled AVX512 instruction set, see > #https://github.com/tarantool/tarantool/issues/6787. > # Hence, skip this when "skylake-avx512" is passed. > - set(LUAJIT_TEST_TAGS_EXTRA +avx512) > + list(APPEND LUAJIT_TEST_TAGS_EXTRA +avx512) > endif() > > set(TEST_SUITE_NAME "LuaJIT-tests") > @@ -73,7 +77,7 @@ add_test_suite_target(LuaJIT-tests > set(test_title "test/${TEST_SUITE_NAME}") > add_test(NAME "${test_title}" > COMMAND ${LUAJIT_TEST_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/test.lua > - +slow +ffi +bit +jit ${LUAJIT_TEST_TAGS_EXTRA} > + +slow +ffi +bit ${LUAJIT_TEST_TAGS_EXTRA} LUAJIT_TEST_TAGS_EXTRA is a list and to convert CMake list to a whitespace-separated strings a list should be put in double quotes. However, I've run tests with options for avx512 and -DLUAJIT_NO_UNWIND=ON and passing test flags works fine without double quotes. > WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} > ) > set_tests_properties("${test_title}" PROPERTIES --------------6Wvr0VyKLwrVfUiatdbAUwJr Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey

thanks for the patch, LGTM.

See a minor comment below.


Sergey

On 14.08.2024 16:55, Sergey Kaplun wrote:
Before this patch +jit flag is given to the LuaJIT test suite
unconditionally even when LuaJIT is built as a pure interpreter.

This patch fixes the behaviour by setting the flag only when
`LUAJIT_DISABLE_JIT` option is not set.

Needed for tarantool/tarantool#9398
---
 test/LuaJIT-tests/CMakeLists.txt | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt
index 9fbe9bf5..019762e0 100644
--- a/test/LuaJIT-tests/CMakeLists.txt
+++ b/test/LuaJIT-tests/CMakeLists.txt
@@ -42,11 +42,15 @@ if(LUAJIT_USE_ASAN)
   endif()
 endif()
 
+if(NOT LUAJIT_DISABLE_JIT)
+  list(APPEND LUAJIT_TEST_TAGS_EXTRA +jit)
+endif()
+
 if(LUAJIT_NO_UNWIND)
   # Test <catch_cpp.lua> verifies the interoperability with C++
   # ABI exceptions, so it requires external unwinding enabled.
   # Hence, skip them otherwise.
-  set(LUAJIT_TEST_TAGS_EXTRA +internal_unwinder)
+  list(APPEND LUAJIT_TEST_TAGS_EXTRA +internal_unwinder)
 endif()
 
 if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512")
@@ -55,7 +59,7 @@ if(CMAKE_C_FLAGS MATCHES "-march=skylake-avx512")
   # built with the enabled AVX512 instruction set, see
   # https://github.com/tarantool/tarantool/issues/6787.
   # Hence, skip this when "skylake-avx512" is passed.
-  set(LUAJIT_TEST_TAGS_EXTRA +avx512)
+  list(APPEND LUAJIT_TEST_TAGS_EXTRA +avx512)
 endif()
 
 set(TEST_SUITE_NAME "LuaJIT-tests")
@@ -73,7 +77,7 @@ add_test_suite_target(LuaJIT-tests
 set(test_title "test/${TEST_SUITE_NAME}")
 add_test(NAME "${test_title}"
   COMMAND ${LUAJIT_TEST_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR}/test.lua
-                                 +slow +ffi +bit +jit ${LUAJIT_TEST_TAGS_EXTRA}
+                                 +slow +ffi +bit ${LUAJIT_TEST_TAGS_EXTRA}

LUAJIT_TEST_TAGS_EXTRA is a list and to convert CMake list to a whitespace-separated strings

a list should be put in double quotes.

However, I've run tests with options for avx512 and -DLUAJIT_NO_UNWIND=ON

and passing test flags works fine without double quotes.

   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
 )
 set_tests_properties("${test_title}" PROPERTIES
--------------6Wvr0VyKLwrVfUiatdbAUwJr--