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 1BF19EACBF5; Mon, 9 Dec 2024 17:41:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1BF19EACBF5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1733755313; bh=RmVsyORt3zzFToMuii3OimKSVh2lvkr+YxgxqWLLg/k=; 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=wFyuuehdfmQ6PVdgNXwGZBSG7z5tAGDsxvicvFVuQumStUVsb5IrtQKyKq/sZW8/G 7z1aRd85zQglfYF5RA7uOme/YSLfkyYVs0fHFvV08rFwmJdwEKKuhQVcCkEBVznKKY ix7aiwEvaAexqL5TA4LJRnMxVDLfSVWLlSM4dsXA= 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 A50BE586688 for ; Mon, 9 Dec 2024 17:41:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A50BE586688 Received: by exim-smtp-fb95f984f-gggzq with esmtpa (envelope-from ) id 1tKexL-00000000Gwc-3Dwo; Mon, 09 Dec 2024 17:41:52 +0300 Date: Mon, 9 Dec 2024 17:40:57 +0300 To: Sergey Bronnikov Message-ID: References: <616560a5fc0131d0f6c5358cebbc267025444334.1733739230.git.skaplun@tarantool.org> <9763bdee-230a-4a09-95bd-15333ef1b3d6@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9763bdee-230a-4a09-95bd-15333ef1b3d6@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9A2BFDE4DD2630CDA5C8AB80D2BA15CF2757296B8134AEA3D182A05F5380850404C228DA9ACA6FE27DA479300533D3E7E3DE06ABAFEAF6705B7473740AD190EB0364DD1BA0E454783B6A098A45AF874EE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE795530B80AF2ADB7BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DA5CEC9EE7F170198638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8751F7DDFD0C883286973821237963548D3F4BFD2C706B76DCC7F00164DA146DAFE8445B8C89999728AA50765F7900637BA939FD1B3BAB99B389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8B861051D4BA689FCF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BC6A536F79815AD9275ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5046FCD8BF9544AE15002B1117B3ED696E96035866F4B265C9E040399BDE4761E823CB91A9FED034534781492E4B8EEAD887A4342A344B6EDBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF100C3D063DD5EF61E70927164F915CEFB2C878F7FDDC9E9B2EAD455BFC4EC66045D21F2230575A0F5C69F0120C2109DF30F87C387773FC78B0BD2FE8AE4436C44276BFE4FFBE3B975F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojBv0bg8QSzYSTmXHW/c0kVg== X-DA7885C5: CF9A4156D98F4041F255D290C0D534F9B7711260D6DA5F4FBE22905F5C737F1F8D7A4A46126EE61D5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F739381B31377CF4CA2194159F5372DCB13A1030C727C904A4F8A3A982D38FAC23FDAE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 2/2] test: fix LuaJIT-tests for old libc version 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 review! On 09.12.24, Sergey Bronnikov wrote: > Hi, Sergey! > > thanks for the patch! > > LGTM after fix a comment below Fixed the comment with a slightly modified patch of yours: =================================================================== diff --git a/test/cmake/GetLibCVersion.cmake b/test/cmake/GetLibCVersion.cmake index d87e8b70..521a6e45 100644 --- a/test/cmake/GetLibCVersion.cmake +++ b/test/cmake/GetLibCVersion.cmake @@ -1,8 +1,12 @@ # Get the libc version installed in the system. macro(GetLibCVersion output) + find_program(ECHO echo) + if(NOT ECHO) + message(FATAL_ERROR "`echo' is not found") + endif() # Try to directly parse the version. execute_process( - COMMAND echo "#include " + COMMAND ${ECHO} "#include " COMMAND ${CMAKE_C_COMPILER} -E -dM - OUTPUT_VARIABLE LIB_C_INFO ERROR_VARIABLE ERROR_MSG @@ -31,6 +35,7 @@ macro(GetLibCVersion output) set(${output} "${GLIBC_MAJOR}.${GLIBC_MINOR}") + unset(ECHO) unset(CMAKE_MATCH_1) unset(GLIBC_MAJOR) unset(GLIBC_MINOR) =================================================================== Force-pushed the branch and updated the PR. > > On 09.12.2024 13:16, Sergey Kaplun wrote: > > The `strtod parsing` subtest in the checks > > the results yielded by the `strtod()` via FFI call. In GLibc versions > > before 2.19 it returns an incorrect result for "0x1p-2075" [1]. This > > patch skips this test for a smaller version of the libc installed. > > > > [1]:https://sourceware.org/bugzilla/show_bug.cgi?id=16151 > > --- > > diff --git a/test/cmake/GetLibCVersion.cmake b/test/cmake/GetLibCVersion.cmake > > new file mode 100644 > > index 00000000..d87e8b70 > > --- /dev/null > > +++ b/test/cmake/GetLibCVersion.cmake > > @@ -0,0 +1,41 @@ > > +# Get the libc version installed in the system. > > +macro(GetLibCVersion output) > > + # Try to directly parse the version. > > + execute_process( > > + COMMAND echo "#include " > > I propose to replace "echo" with a variable set by `find_program()`: > > > diff --git a/test/cmake/GetLibCVersion.cmake > b/test/cmake/GetLibCVersion.cmake > index d87e8b70..15a8b440 100644 > --- a/test/cmake/GetLibCVersion.cmake > +++ b/test/cmake/GetLibCVersion.cmake > @@ -1,8 +1,14 @@ >  # Get the libc version installed in the system. >  macro(GetLibCVersion output) > +  find_program(ECHO echo) > +  if(NOT ECHO) > +    message(FATAL_ERROR "`echo` is not found'") > +    return() > +  endif() > + >    # Try to directly parse the version. >    execute_process( > -    COMMAND echo "#include " > +    COMMAND ${ECHO} "#include " >      COMMAND ${CMAKE_C_COMPILER} -E -dM - >      OUTPUT_VARIABLE LIB_C_INFO >      ERROR_VARIABLE ERROR_MSG > @@ -31,6 +37,7 @@ macro(GetLibCVersion output) > >    set(${output} "${GLIBC_MAJOR}.${GLIBC_MINOR}") > > +  unset(ECHO) >    unset(CMAKE_MATCH_1) >    unset(GLIBC_MAJOR) >    unset(GLIBC_MINOR) > > > + COMMAND ${CMAKE_C_COMPILER} -E -dM - > > + OUTPUT_VARIABLE LIB_C_INFO > > + ERROR_VARIABLE ERROR_MSG > > + OUTPUT_STRIP_TRAILING_WHITESPACE > > + RESULT_VARIABLE RES > > + ) > > + > > +endmacro() -- Best regards, Sergey Kaplun