Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]

DoneSubmitted by Ludovic Courtès.
Details
2 participants
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Severity
important
L
L
Ludovic Courtès wrote on 3 Jul 23:41 +0200
(address . bug-guix@gnu.org)
87tulbxegp.fsf@inria.fr
On current ‘core-updates’(ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,specifically (@@ (gnu packages commencement) guile-final) fails tests oni686-linux:
Toggle snippet (13 lines)Running numbers.testFAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 -10/7)FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (130.0 10/7)FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (-130.0 -10/7)FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (130.0 -10/7)FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (-130.0 10/7)FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 10/7)FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 -10/7)FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 10/7)FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 -10/7)
Note that this doesn’t happen on ‘master’ (glibc 3.31).
Ludo’.
L
L
Ludovic Courtès wrote on 3 Jul 23:45 +0200
control message for bug #49368
(address . control@debbugs.gnu.org)
87sg0vxe9f.fsf@gnu.org
severity 49368 importantquit
M
M
Maxime Devos wrote on 4 Jul 14:06 +0200
Re: bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
c3d4cad63eaef080975b83afcd0c4c60161263dd.camel@telenet.be
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
Toggle quote (21 lines)> On current ‘core-updates’> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,> specifically (@@ (gnu packages commencement) guile-final) fails tests on> i686-linux:> > --8<---------------cut here---------------start------------->8---> Running numbers.test> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 -10/7)> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (130.0 10/7)> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (-130.0 -10/7)> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (130.0 -10/7)> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (-130.0 10/7)> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 10/7)> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 -10/7)> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 10/7)> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 -10/7)> --8<---------------cut here---------------end--------------->8---> > Note that this doesn’t happen on ‘master’ (glibc 3.31).
In a REPL:
(euclidean/ 130.0 10/7)(euclidean/ 130.0 -10/7)(floor/ 130.0 10/7)(floor/ -130.0 -10/7)(ceiling/ 130.0 -10/7)(ceiling/ -130.0 10/7)(truncate/ 130.0 10/7)(truncate/ 130.0 -10/7)(truncate/ -130.0 10/7)(truncate/ -130.0 -10/7)
Output on core-updates (using --keep-failed and ./meta/uninstalled-env guile):
scheme@(guile-user)> (euclidean/ 130.0 10/7)$1 = 90.0$2 = 1.4285714285714257scheme@(guile-user)> (euclidean/ 130.0 -10/7)$3 = -90.0$4 = 1.4285714285714257scheme@(guile-user)> (floor/ 130.0 10/7)$5 = 90.0$6 = 1.4285714285714257scheme@(guile-user)> (floor/ -130.0 -10/7)$7 = 90.0$8 = -1.4285714285714257scheme@(guile-user)> (ceiling/ 130.0 -10/7)$9 = -90.0$10 = 1.4285714285714257scheme@(guile-user)> (ceiling/ -130.0 10/7)$11 = -90.0$12 = -1.4285714285714257scheme@(guile-user)> (truncate/ 130.0 10/7)$13 = 90.0$14 = 1.4285714285714257scheme@(guile-user)> (truncate/ 130.0 -10/7)$15 = -90.0$16 = 1.4285714285714257scheme@(guile-user)> (truncate/ -130.0 10/7)$17 = -90.0$18 = -1.4285714285714257scheme@(guile-user)> (truncate/ -130.0 -10/7)$19 = 90.0$20 = -1.4285714285714257
It appears that truncate/, ceiling/ and floor/ give the same output ...that doesn't seem correct.
Greetings,Maxime.
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOGkPBccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pb/AP4iErBmWRYgxDQmlFpOgaItThKBv61U/iNfeIA0mGNNqwD9Fm27V20yPTIfUNH1HFKo54Tesd/5RADeIMOpWyAR2wA==GU8x-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 4 Jul 14:31 +0200
707865c726394c527a9141e742a575c2e4e19a67.camel@telenet.be
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
Toggle quote (10 lines)> On current ‘core-updates’> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,> specifically (@@ (gnu packages commencement) guile-final) fails tests on> i686-linux:> > --8<---------------cut here---------------start------------->8---> Running numbers.test> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)> [...]
Curiously, on core-updates, ceiling/ is inconsistent with ceiling-quotientand ceiling-remainder:
scheme@(guile-user) [1]> (ceiling/ 130.0 -10/7)$28 = -90.0$29 = 1.4285714285714257scheme@(guile-user) [1]> (ceiling-quotient 130.0 -10/7)$30 = -91.0scheme@(guile-user) [1]> (ceiling-remainder 130.0 -10/7)$31 = 0.0
But on 'master', the results are consistent:
scheme@(guile-user)> (ceiling/ 130.0 -10/7)$1 = -91.0$2 = 0.0scheme@(guile-user)> (ceiling-quotient 130.0 -10/7)$3 = -91.0scheme@(guile-user)> (ceiling-remainder 130.0 -10/7)$4 = 0.0
To be investigated ...
Greetings,Maxime.
Toggle quote (1 lines)>
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOGqOhccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oYtAP4lFjMOZyfCyJp9+W9e/RoS2kNg35ZmRF8jK8jV3WemtgD/Vpfi1ljFf2TEJm4tKh7G/2OzQ0TMoEhxDXfhGCRpUQU==A9Zb-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 6 Jul 15:24 +0200
b6b4a1391d032a4f01ab5901e12464493e1c10a2.camel@telenet.be
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
Toggle quote (23 lines)> On current ‘core-updates’> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,> specifically (@@ (gnu packages commencement) guile-final) fails tests on> i686-linux:> > --8<---------------cut here---------------start------------->8---> Running numbers.test> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 -10/7)> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (130.0 10/7)> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (-130.0 -10/7)> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (130.0 -10/7)> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (-130.0 10/7)> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 10/7)> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 -10/7)> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 10/7)> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 -10/7)> --8<---------------cut here---------------end--------------->8---> > Note that this doesn’t happen on ‘master’ (glibc 3.31).> > Ludo’.
I wondered if the implementation of the C function 'ceil' is buggy,so I tried the following (spoiler: 'ceil' doesn't seem to be the issue,or I need another test case:
Run "guix build --system=i686-linux -e (@@ (gnu packages commencement) guile-final) --keep-failed".In the build directory, write to a file "test.c":
#include <stdio.h>#include <math.h>
intmain(void){ double x; double y; if (scanf("%lf %lf", &x, &y) < 0) /* < 0 is actually incorrect here */ return 1; if (printf("%lf/%lf=%lf\n", x,y, x/y) < 0) return 1; if (printf("ceil(%lf/%lf)=%lf\n", x,y, ceil(x/y)) < 0) return 1; return 0;}
Run ((exact->inexact 10/7) = 1.4285714285714286 on both master and core-updates):
$ gcc -Wall -Wextra -lm test.c -o test$ echo "130.0 1.4285714285714286" | ./test130.000000/1.428571=91.000000ceil(130.000000/1.428571)=91.000000
On master, the output is:130.000000/1.428571=91.000000ceil(130.000000/1.428571)=91.000000(idem)
Greetings,Maxime.
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYORZnhccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7q/WAQD4dfWMlKM9QjPclKIrEhyjZ5frlUbDUyS3ybODRQXJyAD8CbgxbnFTq0qARX+7Cu/XY2oZxpd+on6g5ddpcFjbJAk==3504-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 24 Jul 20:46 +0200
(address . 49368-done@debbugs.gnu.org)
7fce1551ca9819053aa094923e6d6f39b9966f22.camel@telenet.be
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
Toggle quote (10 lines)> On current ‘core-updates’> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,> specifically (@@ (gnu packages commencement) guile-final) fails tests on> i686-linux:> > --8<---------------cut here---------------start------------->8---> Running numbers.test> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)> [...]
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYPxgARccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nLJAP4vFJtHqZpJR3x3GqT8iAMBIgSs0xMTdWLdjMq1riDaCAD/YJInSXX/t1KEyZ91c8vuQO4cv7w1n76hCtTHyaFIAwY==9Tkp-----END PGP SIGNATURE-----

Closed
?