classification
Title: test_ctypes: fails on sparc64 long double
Type: behavior Stage:
Components: Tests Versions: Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]
View: 6029
Assigned To: Nosy List: jengelh, mark.dickinson
Priority: normal Keywords:

Created on 2010-07-02 12:51 by jengelh, last changed 2010-07-02 13:46 by mark.dickinson. This issue is now closed.

Messages (2)
msg109107 - (view) Author: Jan Engelhardt (jengelh) Date: 2010-07-02 12:51
When python is compiled with sparc64 settings (i.e. -m64), test_ctypes fails. I am not sure why this does not show up with -m32.

ares:/usr/src/packages/BUILD/Python-2.6.5> LD_LIBRARY_PATH=/usr/src/packages/BUILD/Python-2.6.5 ./python -E -tt ./Lib/test/regrtest.py -s test_ctypes
test_ctypes
test test_ctypes failed -- Traceback (most recent call last):
  File "/usr/src/packages/BUILD/Python-2.6.5/Lib/ctypes/test/test_callbacks.py", line 81, in test_longdouble
    self.check_type(c_longdouble, 3.14)
  File "/usr/src/packages/BUILD/Python-2.6.5/Lib/ctypes/test/test_callbacks.py", line 30, in check_type
    self.failUnlessEqual(self.got_args, (-3, arg))
AssertionError: (-3, 0.0) != (-3, 3.1400000000000001)

When using "long double x = 3.14", the constant 3.14 is taken as a double, which is then converted to long double. Of course it isn't accurate. There must be something in python that doesn't generate this correctly; it should have been "long double x = 3.14L", since only the constant 3.14L expands to the full longdouble pi.
msg109110 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-07-02 13:46
I think this is a duplicate of issue 6029.
History
Date User Action Args
2010-07-02 13:46:44mark.dickinsonsetstatus: open -> closed

nosy: + mark.dickinson
messages: + msg109110

superseder: FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]
resolution: duplicate
2010-07-02 12:51:30jengelhcreate