[Tarantool-patches] [PATCH luajit] test: harden skipcond for libc in LuaJIT-tests
Maxim Kokryashkin
m.kokryashkin at tarantool.org
Mon Dec 23 10:43:09 MSK 2024
Hi, Sergey!
Thanks for the patch!
LGTM, except for the single nit below.
On Thu, Dec 19, 2024 at 12:30:41PM +0300, Sergey Kaplun wrote:
> The `strtod parsing` subtest in the <lib/base/tonumber_scan.lua> checks
> the results yielded by the `strtod()` via FFI call. In glibc versions
> before 2.28 it returns an incorrect result (NaN instead of inf) for
> "0x3p1023" [1]. This patch hardens the skipcond for this test for a
> smaller version of the libc installed.
I believe these versions are usually referred to as `older`, not
`smaller`. Feel free to ignore.
Side note: I agree with Sergey Bronnikov here, we should really try
and push the operating systems that have reached their EOL out of
our CI, so we can focus on something that matters.
>
> [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=23279
> ---
>
> Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-glibc-versions
>
> The CI failure for libc 2.23 (ubuntu 16):
> https://github.com/tarantool/tarantool/actions/runs/12376159316/job/34542626889?pr=10949#step:5:13916
> The CI failure for libc 2.24 (debian 9):
> https://github.com/tarantool/tarantool/actions/runs/12376159307/job/34542633454?pr=10949#step:5:13859
> The CI failure for libc 2.27 (ubuntu 18):
> https://github.com/tarantool/tarantool/actions/runs/12376159278/job/34542625496?pr=10949#step:5:11743
> The CI pass for libc 2.31 (ubuntu 20):
> https://github.com/tarantool/tarantool/actions/runs/12376159289/job/34542630993?pr=10949
>
> test/LuaJIT-tests/lib/base/tonumber_scan.lua | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/test/LuaJIT-tests/lib/base/tonumber_scan.lua b/test/LuaJIT-tests/lib/base/tonumber_scan.lua
> index ac7d68a4..800c57b0 100644
> --- a/test/LuaJIT-tests/lib/base/tonumber_scan.lua
> +++ b/test/LuaJIT-tests/lib/base/tonumber_scan.lua
> @@ -186,9 +186,11 @@ do --- tonumber parsing
> test_conv(tonumber)
> end
>
> --- Skip for the old libc version with the bug in the `strtod()`.
> --- See also https://sourceware.org/bugzilla/show_bug.cgi?id=16151.
> -do --- strtod parsing -libc<2.19
> +-- Skip for the old libc version with the bugs in the `strtod()`.
> +-- Affected versions:
> +-- * <2.19: https://sourceware.org/bugzilla/show_bug.cgi?id=16151.
> +-- * <2.28: https://sourceware.org/bugzilla/show_bug.cgi?id=23279.
> +do --- strtod parsing -libc<2.28
> test_conv(function(s)
> local d = ffi.C.strtod(s, e)
> return (e[0][0] == 0 and #s ~= 0) and d or nil
> --
> 2.47.0
>
More information about the Tarantool-patches
mailing list