New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0 make test failures on Solaris 10 #48756
Comments
I downloaded the 3.0 tarfile and did a straightforward
on Solaris 10 and got several test failures:
Here's the output for just the failing tests: test test_cmath failed -- Traceback (most recent call last):
File "/home/tuba/skipm/src/Python-3.0/Lib/test/test_cmath.py", line 336,
in test_specific_values
self.fail('OverflowError not raised in test %s' % test_str)
AssertionError: OverflowError not raised in test exp0052: exp(complex(710.0,
1.5))
test test_posix failed -- Traceback (most recent call last):
File "/home/tuba/skipm/src/Python-3.0/Lib/test/test_posix.py", line 252,
in test_getcwd_long_pathnames
support.rmtree(base_path)
File "/home/tuba/skipm/src/Python-3.0/Lib/test/support.py", line 98, in
rmtree shutil.rmtree(path)
File "/home/tuba/skipm/src/Python-3.0/Lib/shutil.py", line 225, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/home/tuba/skipm/src/Python-3.0/Lib/shutil.py", line 223, in rmtree
os.rmdir(path)
OSError: [Errno 22] Invalid argument:
'/home/tuba/skipm/src/Python-3.0/@test.getcwd'
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: can't initialize sys standard streams
ImportError: No module named encodings.utf_8
.
this bit of output is from a test of stdout in a different process ...
test test_subprocess failed -- Traceback (most recent call last):
File "/home/tuba/skipm/src/Python-3.0/Lib/test/test_subprocess.py", line
115, in test_executable
self.assertEqual(p.returncode, 47)
AssertionError: -6 != 47 Here's the test_math output run through regrtest with the -v option:
Traceback (most recent call last):
File "/home/tuba/skipm/src/Python-3.0/Lib/test/test_math.py", line 510, in
testLog
self.assertRaises(ValueError, math.log, NINF)
AssertionError: ValueError not raised by log
Traceback (most recent call last):
File "/home/tuba/skipm/src/Python-3.0/Lib/test/test_math.py", line 532, in
testLog10
self.assertRaises(ValueError, math.log10, NINF)
AssertionError: ValueError not raised by log10
Skip |
I think you brought up the math and cmath errors before, and I never I don't think the (c)math test failures should be regarded as terribly Could you please tell me what cmath.exp(complex(710.0, 1.5)) actually returns, if it doesn't raise OverflowError? (Don't know nuffin about posix and subprocess.) |
Mark> I think you brought up the math and cmath errors before, and I I vaguely remember something about that. If I can be a "test mule" for you,
(1.5802653829857376e+307+inf*j) Maybe it needs to overflow along both axes??? S |
Those values look right; except that there's some code near the end of If you have time, could you try the attached patch and report what gets Python 3.1a0 (py3k:67510M, Dec 3 2008, 20:56:19)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cmath
>>> cmath.exp(710.0 + 1.5j)
r.real, r.imag: 1.58027e+307, inf
Py_IS_INFINITY(r.real), Py_IS_INFINITY(r.imag): 0, 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: math range error Mark |
Tracker issue: I don't seem to be able to remove the 'patch' keyword |
Mark> If you have time, could you try the attached patch and report what Looks similar here: % ./python
Python 3.0 (r30:67503, Dec 3 2008, 14:46:39)
[GCC 4.2.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import cmath
>>> cmath.exp(complex(710.0, 1.5))
r.real, r.imag: 1.58027e+307, Inf
Py_IS_INFINITY(r.real), Py_IS_INFINITY(r.imag): 0, 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: math range error If I then comment back out your two printf statements and recompile, it once % ./python
Python 3.0 (r30:67503, Dec 3 2008, 14:46:39)
[GCC 4.2.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import cmath ; cmath.exp(complex(710.0, 1.5))
(1.5802653829857376e+307+inf*j) Very weird. If I uncomment either of your printf statements OverflowError Skip |
Mark, I trimmed down cmathmodule.c to just contain c_exp then Skip |
Thanks for the assembly code---you're running Solaris on x86! Why I think I have an idea what's going on: it's the old extended-precision I guess the printf calls force the value from register to memory Now to prove my theory by turning this into a fix, somehow. It seems as though this problem isn't really specific to Solaris; I For the test_math failure, there have been problems with log on other |
Mark> Thanks for the assembly code---you're running Solaris on x86! Why I'm failry sure I can find a SPARC here to run it on as well. They are Skip |
I don't think that's necessary. Thanks for disabusing me of my 'Solaris There are two more pieces of information that *would* be useful:
Mark |
Mark> 1. What happens if you build with the '-ffloat-store' option to Doesn't quite work: % ./python
Python 3.0 (r30:67503, Dec 5 2008, 09:48:42)
[GCC 4.2.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import cmath
>>> cmath.exp(complex(710.0, 1.5))
Segmentation Fault (core dumped) :-/
Thanks for the tip. The configure script doesn't #include <math.h> so
I found this code in /usr/include/iso/math_c99.h, included by <math.h>: #undef isinf
#define isinf(x) __builtin_isinf(x) Skip |
The segfault is a little worrying; I don't understand that at all. Skip, can you come up with a configure patch that would allow isinf to be I'll also patch Py_IS_INFINITY to make sure that it forces its argument |
The plot thickens. I know squat about autoconf sorts of things so I The Python ACHECK_FUNCS test should be rewritten (with proper m4 AC_CHECK_FUNCS([acosh asinh atanh expm1 finite log1p])
AC_CHECK_DECLS([isinf, isnan], [], [], [[#include <math.h>]]) so I gave that a whirl. Whaddya know? isinf *really* isn't available, #include <math.h>
int
main ()
{
#ifndef isinf
(void) isinf;
#endif
;
return 0;
} which fails to compile/link on our Sol10 boxes. Turns out libm.so http://git.savannah.gnu.org/gitweb/? I'll leave that for you to decide. In any case, the above changes to AC_CHECK_FUNCS should probably be Skip |
Thanks, Skip. It looks like the top priority is fixing Py_IS_INFINITY, I'll look at the changes to AC_CHECK_FUNCS, too. |
autoconf checks for isinf and isnan fixed in r68299. |
NB: I fixed the test_posix failure on trunk/2.6/py3k/3.1 in r73908, |
Are there any open problems left here or can this bug be closed? |
This appears to be fixed. Skip: keywords now has a '-no selection-' option to get rid of keywords |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: