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 C5DFE4363FD; Tue, 17 Dec 2024 15:18:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C5DFE4363FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1734437930; bh=hLaYzvcf+XAYzxU4CcxhdkFeRoL9Q5U6FtxLspJ0Geg=; 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=G35v4AJ2OR8pBQ5uv3k9H28CtB1ouH+jMjAkaZd3gqtTSeWQVBnKs1HcGeBvhWvUA JwydFwOSQNmKUo+lhaulDVGaNdw9Bbv/CKTxS1BDJh/4LipJLdU6q9r5gl2SbXBH3V liJW6B3XPdD+bGNHRGZMt92NHi6gpP2UwRE3+C18= 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 E49344363FD for ; Tue, 17 Dec 2024 15:18:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E49344363FD Received: by exim-smtp-84dbd655b7-kknnr with esmtpa (envelope-from ) id 1tNWXH-00000000LEl-3mP8; Tue, 17 Dec 2024 15:18:48 +0300 Date: Tue, 17 Dec 2024 15:17:48 +0300 To: Sergey Bronnikov Cc: Maksim Tiushev , tarantool-patches@dev.tarantool.org Message-ID: References: <7f8dea571105b6780b05d633df0d75b8c1a8a3c1.1733909411.git.skaplun@tarantool.org> <0807ccb5-8d41-49a9-a57e-3ab9c6c705f7@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0807ccb5-8d41-49a9-a57e-3ab9c6c705f7@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9D0F949AE8EC90782089D553DE58DC8B84686A51C082A128D182A05F5380850404C228DA9ACA6FE2771157CC347EA59483DE06ABAFEAF6705E0C08F8F5D8F0708A2EEF5056EB40C1B3DBFFC9DE3409321 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70386A6136E33FD82EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063770F3384661E7DC4D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8E80255EA066E8434895F9903806B31962826AD38D31D8D94CC7F00164DA146DAFE8445B8C89999728AA50765F79006375FFD5C25497261569FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3ED8438A78DFE0A9E117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407978DA827A17800CE773BC869C69ECC1572DBA43225CD8A89F83C798A30B85E16B5E1C53F199C2BB95B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A518DEC873A6CF5CA95002B1117B3ED696709C84D8E0F532DD957033528158102E823CB91A9FED034534781492E4B8EEADF5E532225D4D775BBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34BDCC71B3781C9C950C58A616575CF1AA1C0D875CCD90C08F62ECA9AA55EC5BE88A7AB3FCE3A08A0A1D7E09C32AA3244CD6A678D27231359777DD89D51EBB7742871974D7D94B6B81EA455F16B58544A2557BDE0DD54B3590A5AE236DF995FB59829709634694AABAED6A17656DB59BCAD427812AF56FC65B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrmbv0RPnqfSQpa5ViRnaCA== X-DA7885C5: 3E644389CEC48694F255D290C0D534F9B226C262185AF2A30600BF8B956753CC777E3A93E8D32BED5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F739381B31377CF4CA219558230626379F3FCE39CA85D17D07A8B9241969F8EED9B75E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v5 luajit 2/3] cmake: run tests with Valgrind 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the comments! Fixed them and force-pushed the branch. On 17.12.24, Sergey Bronnikov wrote: > Hello, > > Thanks for fixes! > > LGTM after fixing minor comments below. > > On 16.12.2024 19:40, Sergey Kaplun wrote: > > Hi, Sergey! > > Thansk for the review! > > See my answers below, all patches are force-pushed to the branch. > > The branch is rebased on master. > > > > On 13.12.24, Sergey Bronnikov wrote: > > > > > | cmake: run tests with Valgrind > > | > > | This patch enables running tests with Valgrind. There is a > > | `VALGRIND_OPTS` variable [1] that we can set -- it makes the usage of > > | Valgrind more flexible -- we can define any necessary flags in the > > | command line (not at the building stage). By default, the suppression > > | files are set to (original suppression file in LuaJIT) and > > | an additional one (maintained by us). > > | > > | Also, this patch disables the following tests when running with Valgrind > > | due to failures. > please replace dot with colon, because below the enumeration of disabled > tests Replaced. > > | > > | The test is > > | disabled due to its time sensitivity (it is not run the expected amount > > | of time with Valgrind). > > | > > | These tests from the tarantool-tests suite are disabled due to > > | tarantool/tarantool#10803: > > | - lj-726-profile-flush-close.test.lua > > | - profilers/gh-5688-tool-cli-flag.test.lua > > | - profilers/gh-7264-add-proto-trace-sysprof-default.test.lua > > | - profilers/misclib-sysprof-lapi.test.lua > > | > > | Timed out due to running under Valgrind: > > | - tarantool-c-tests/gh-8594-sysprof-ffunc-crash.c_test > > | - tarantool-tests/gh-7745-oom-on-trace.test.lua > > | - tarantool-tests/lj-1034-tabov-error-frame.test.lua > > | > > | [1]:https://valgrind.org/docs/manual/manual-core.html#manual-core.defopts > > | > > | Part of tarantool/tarantool#3705 > > > > ) > > + # Set the exit code to non-zero to automatically detect > > + # failing tests. > because "when set to the default value (zero), > the return value from Valgrind will always be the return value of the > process being simulated.", I believe it is an important thing, and it's > worth to add to comment. Enriched the comment: =================================================================== diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a5075f05..87e4b907 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -88,8 +88,10 @@ if(LUAJIT_USE_VALGRIND) --suppressions=${LUAJIT_SOURCE_DIR}/lj.supp --suppressions=${LUAJIT_SOURCE_DIR}/lj_extra.supp ) - # Set the exit code to non-zero to automatically detect - # failing tests. + # When set to the default value (zero), the return value from + # Valgrind will always be the return value of the process being + # simulated. Set the exit code to non-zero to automatically + # detect failing tests. set(LUAJIT_TEST_VALGRIND_COMMAND ${VALGRIND} --error-exitcode=1 ${LUAJIT_TEST_VALGRIND_SUPP}) set(LUAJIT_TEST_COMMAND =================================================================== > > set(LUAJIT_TEST_COMMAND > > "${VALGRIND} --error-exitcode=1 " > > "${LUAJIT_TEST_VALGRIND_SUPP} ${LUAJIT_TEST_COMMAND}") > > =================================================================== > > > >>> + "${LUAJIT_TEST_VALGRIND_SUPP} ${LUAJIT_TEST_COMMAND}") > >>> diff --git a/test/tarantool-c-tests/CMakeLists.txt b/test/tarantool-c-tests/CMakeLists.txt > >>> index 30d174bb..5f6c45da 100644 > >>> --- a/test/tarantool-c-tests/CMakeLists.txt > >>> +++ b/test/tarantool-c-tests/CMakeLists.txt > >>> @@ -56,10 +56,19 @@ foreach(test_source ${tests}) > >>> > >>> # Generate CMake tests. > >>> set(test_title "test/${TEST_SUITE_NAME}/${exe}${C_TEST_SUFFIX}") > >>> + set(test_command ${CMAKE_CURRENT_BINARY_DIR}/${exe}${C_TEST_SUFFIX}) > >>> + > >>> + if(LUAJIT_USE_VALGRIND) > >>> + set(test_command ${VALGRIND} --error-exitcode=1 ${LUAJIT_TEST_VALGRIND_SUPP} > >> The same already defined in test/CMakeLists.txt, could you reuse already > >> defined value? > > Yes, good catch! > > =================================================================== > > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt > > index 9685c494..fcd697c9 100644 > > --- a/test/CMakeLists.txt > > +++ b/test/CMakeLists.txt > > @@ -90,9 +90,10 @@ if(LUAJIT_USE_VALGRIND) > > ) > > # Set the exit code to non-zero to automatically detect > > # failing tests. > > + set(LUAJIT_TEST_VALGRIND_COMMAND > > + ${VALGRIND} --error-exitcode=1 ${LUAJIT_TEST_VALGRIND_SUPP}) > bad indentation > > set(LUAJIT_TEST_COMMAND > > - "${VALGRIND} --error-exitcode=1 " > > - "${LUAJIT_TEST_VALGRIND_SUPP} ${LUAJIT_TEST_COMMAND}") > > + "${LUAJIT_TEST_VALGRIND_COMMAND} ${LUAJIT_TEST_COMMAND}") > bad indentation Added 2 addtional spaces: =================================================================== diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fcd697c9..a5075f05 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -91,9 +91,9 @@ if(LUAJIT_USE_VALGRIND) # Set the exit code to non-zero to automatically detect # failing tests. set(LUAJIT_TEST_VALGRIND_COMMAND - ${VALGRIND} --error-exitcode=1 ${LUAJIT_TEST_VALGRIND_SUPP}) + ${VALGRIND} --error-exitcode=1 ${LUAJIT_TEST_VALGRIND_SUPP}) set(LUAJIT_TEST_COMMAND - "${LUAJIT_TEST_VALGRIND_COMMAND} ${LUAJIT_TEST_COMMAND}") + "${LUAJIT_TEST_VALGRIND_COMMAND} ${LUAJIT_TEST_COMMAND}") endif() separate_arguments(LUAJIT_TEST_COMMAND) =================================================================== > > endif() > > > > separate_arguments(LUAJIT_TEST_COMMAND) > > -- Best regards, Sergey Kaplun