[Tarantool-patches] [PATCH luajit] test: harden skipcond for libc in LuaJIT-tests

Sergey Kaplun skaplun at tarantool.org
Thu Dec 19 12:30:41 MSK 2024


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.

[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