failing tests on amd64

0 views
Skip to first unread message

Vinzent Steinberg

unread,
Aug 6, 2009, 2:20:20 PM8/6/09
to sympy
http://buildbot.sympy.org/builders/amd64-py2.5-sympy-tests/builds/287/steps/shell/logs/stdio

Could someone with access to an amd64 machine please debug the cause
of this?

Vinzent

Ondrej Certik

unread,
Aug 7, 2009, 2:19:31 PM8/7/09
to sy...@googlegroups.com

I don't have time to fix this currently. In the worst case we'll just
revert the patches, if you don't know how to fix this. My amd64 boxes
are now inaccessible, but once we fix it, I'll give you an account, so
that you can debug this.

Ondrej

Ondrej Certik

unread,
Aug 9, 2009, 2:01:23 AM8/9/09
to sy...@googlegroups.com

There are several failures, but I just took one and after a bit of
debugging, this is what fails for me in the current sympy:

$ bin/test sympy/mpmath/tests/test_hp.py
sympy/mpmath/tests/test_matrices_mpmath.py
============================= test process starts ==============================
executable: /usr/bin/python (2.6.2-final-0)

sympy/mpmath/tests/test_hp.py[3] ... [OK]
sympy/mpmath/tests/test_matrices_mpmath.py[8] ...F.... [FAIL]

________________________________________________________________________________
_______ sympy/mpmath/tests/test_matrices_mpmath.py:test_matrix_creation ________
File "/home/ondrej/repos/sympy/sympy/mpmath/tests/test_matrices_mpmath.py",
line 98, in test_matrix_creation
[one/3, one/4, one/5]])
AssertionError


However, this works:

$ bin/test sympy/mpmath/tests/test_matrices_mpmath.py
============================= test process starts ==============================
executable: /usr/bin/python (2.6.2-final-0)

sympy/mpmath/tests/test_matrices_mpmath.py[8] ........ [OK]

=================== tests finished: 8 passed in 0.07 seconds ===================


So mpmath or sympy is doing something that it shouldn't have been doing.

Ondrej

Ondrej Certik

unread,
Aug 9, 2009, 2:12:43 AM8/9/09
to sy...@googlegroups.com


A quick bisect shows that this commit broke it:

$ git bisect gooddc6736a56da7c054a7fc00e486b258bd73bade24 is first bad commit
commit dc6736a56da7c054a7fc00e486b258bd73bade24
Author: Fredrik Johansson <fredrik....@gmail.com>
Date: Fri Feb 6 14:50:44 2009 +0100

Update sympy.mpmath to mpmath-svn

* A few fixes in evalf.py were needed. In particular, I simplified the
extrapolating
numerical summation code to just call mpmath.nsum instead. It is
a bit slower,
but works better.
* statistics.Normal now uses mpmath.erfinv instead of the ad-hoc
implementation
* A few other small interface incompatibilities in mpmath were adjusted for

All tests pass, but I could have broken some imports etc that cause it to
pass only by accident on my machine.

The new mpmath docs are not included in this patch.

Also, no particular support has been added for any of the several
new functions
in mpmath.

Signed-off-by: Ondrej Certik <ond...@certik.cz>

:040000 040000 e028279435be3c2c1206b5f95211d0b5145ffe2f
891d34833ad510bafb7c0da77d109eb378bb8149 M sympy

Fredrik, any ideas how to get this fixed? Can you reproduce it?

It was broken from this commit, it's just that the tests were never
run in this order. The order was reversed by this patch:

334b0a5 (test: run all tests containing any of the given strings in
their path, 2009-07-27)

I don't currently understand why, so I am looking into this and try to
fix it. Nevertheless, the above thing is still a bug.

Ondrej

Ondrej Certik

unread,
Aug 9, 2009, 2:49:24 AM8/9/09
to sy...@googlegroups.com


I have figured that out -- if you use get_paths(), you need to sort
the list after that, just like at other places in runtests.py. So this
simple patch fixes it:

diff --git a/sympy/utilities/runtests.py b/sympy/utilities/runtests.py
index 66ba79f..92e1eeb 100644
--- a/sympy/utilities/runtests.py
+++ b/sympy/utilities/runtests.py
@@ -89,6 +89,8 @@ def test(*args, **kwargs):
mypaths = []
for p in t.get_paths(dir='sympy'):
mypaths.extend(glob(p))
+ mypaths = list(set(mypaths))
+ mypaths.sort()
t.add_paths([p for p in mypaths if any(a in p for a in args)])
return t.test()


This is a really critical thing, since the tests were failing on our
buildbots, so I pushed that in. Now all the tests pass again on
buildbots, so we don't have to revert any patches.

Nevertheless, the above bug in mpmath (and apparently also in nseries,
see the buildbot logs) stays.

What we could do, if anyone has time to implement that, is to test the
testsuite in a random order, it would probably reveal couple more
similar bugs.

Ondrej

Vinzent Steinberg

unread,
Aug 10, 2009, 12:26:14 PM8/10/09
to sympy
On Aug 9, 8:49 am, Ondrej Certik <ond...@certik.cz> wrote:
> This is a really critical thing, since the tests were failing on our
> buildbots, so I pushed that in. Now all the tests pass again on
> buildbots, so we don't have to revert any patches.
>
> Nevertheless, the above bug in mpmath (and apparently also in nseries,
> see the buildbot logs) stays.
>
> What we could do, if anyone has time to implement that, is to test the
> testsuite in a random order, it would probably reveal couple more
> similar bugs.
>
> Ondrej

Thank you a lot. Testing in random order is trivial to implement, just
use random.shuffle() instead of .sort().

Vinzent

Ondrej Certik

unread,
Aug 10, 2009, 1:07:23 PM8/10/09
to sy...@googlegroups.com

Great --- let's create an option in the test runner.

Ondrej

Vinzent Steinberg

unread,
Aug 10, 2009, 2:06:01 PM8/10/09
to sympy
On 10 Aug., 19:07, Ondrej Certik <ond...@certik.cz> wrote:
> Great --- let's create an option in the test runner.

Ok. :)

http://groups.google.com/group/sympy-patches/browse_thread/thread/50ed1a56ecc1af73

Vinzent
Reply all
Reply to author
Forward
0 new messages