classification
Title: double Endian problem and more on arm
Type: Stage:
Components: ctypes Versions: Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: theller Nosy List: mancausoft, mark.dickinson, theller (3)
Priority: Keywords

Created on 2009-10-24 23:52 by mancausoft, last changed 2009-10-25 20:22 by mark.dickinson.

Messages (4)
msg94444 - (view) Author: Mancausoft (mancausoft) Date: 2009-10-24 23:52
I compile python for arm (on debian etch) but it don't  pass ctype
test:

======================================================================
FAIL: test_struct_return_2H
(ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase)
----------------------------------------------------------------------                    
Traceback (most recent call last):                                                        
  File
"/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_as_parameter.py", line
171, in test_struct_return_2H
    self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3))                                                     
AssertionError: (99, 88) != (198, 264)                                                                     

======================================================================
FAIL: test_struct_return_2H
(ctypes.test.test_as_parameter.AsParamWrapperTestCase)
----------------------------------------------------------------------            
Traceback (most recent call last):                                                
  File
"/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_as_parameter.py", line
171, in test_struct_return_2H
    self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3))                                                     
AssertionError: (99, 88) != (198, 264)                                                                     

======================================================================
FAIL: test_struct_return_2H
(ctypes.test.test_as_parameter.BasicWrapTestCase)
----------------------------------------------------------------------       
Traceback (most recent call last):                                           
  File
"/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_as_parameter.py", line
171, in test_struct_return_2H
    self.failUnlessEqual((s2h.x, s2h.y), (99*2, 88*3))
AssertionError: (99, 88) != (198, 264)

======================================================================
FAIL: test_endian_double (ctypes.test.test_byteswap.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_byteswap.py",
line 137, in test_endian_double
    self.failUnlessEqual(bin(struct.pack("<d", math.pi)), bin(s))
AssertionError: '182D4454FB210940' != 'FB210940182D4454'

======================================================================
FAIL: test_unaligned_native_struct_fields
(ctypes.test.test_byteswap.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_byteswap.py",
line 277, in test_unaligned_native_struct_fields
    self.failUnlessEqual(bin(s1), bin(s2))
AssertionError: '123412007856341200B81E09401F85EB51' !=
'1234120078563412001F85EB51B81E0940'
msg94448 - (view) Author: Mark Dickinson (mark.dickinson) Date: 2009-10-25 08:11
The 4th failure (test_endian_double) probably has nothing to do with 
ctypes.  See also issue #1762561.
msg94450 - (view) Author: Mancausoft (mancausoft) Date: 2009-10-25 12:40
Mark Dickinson <report@bugs.python.org> scrisse:

> The 4th failure (test_endian_double) probably has nothing to do with 
> ctypes.  See also issue #1762561.

I try to use the patch arm-float2.diff, but test result is the same: 

======================================================================
FAIL: test_struct_return_2H
(ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase)
----------------------------------------------------------------------
Traceback (most recent call last): File
"/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_as_parameter.py", line
171, in test_struct_return_2H self.failUnlessEqual((s2h.x, s2h.y),
(99*2, 88*3)) AssertionError: (99, 88) != (198,
264)                                                                     

======================================================================
FAIL: test_struct_return_2H
(ctypes.test.test_as_parameter.AsParamWrapperTestCase)
----------------------------------------------------------------------
Traceback (most recent call last): File
"/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_as_parameter.py", line
171, in test_struct_return_2H self.failUnlessEqual((s2h.x, s2h.y),
(99*2, 88*3)) AssertionError: (99, 88) != (198,
264)                                                                     

======================================================================
FAIL: test_struct_return_2H
(ctypes.test.test_as_parameter.BasicWrapTestCase)
----------------------------------------------------------------------
Traceback (most recent call last): File
"/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_as_parameter.py", line
171, in test_struct_return_2H self.failUnlessEqual((s2h.x, s2h.y),
(99*2, 88*3)) AssertionError: (99, 88) != (198, 264)

======================================================================
FAIL: test_endian_double (ctypes.test.test_byteswap.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_byteswap.py",
line 137, in test_endian_double
self.failUnlessEqual(bin(struct.pack("<d", math.pi)), bin(s))
AssertionError: '182D4454FB210940' != 'FB210940182D4454'

======================================================================
FAIL: test_unaligned_native_struct_fields
(ctypes.test.test_byteswap.Test)
----------------------------------------------------------------------
Traceback (most recent call last): File
"/mnt/root/stackless-2.6.3/Lib/ctypes/test/test_byteswap.py", line 277,
in test_unaligned_native_struct_fields self.failUnlessEqual(bin(s1),
bin(s2)) AssertionError: '123412007856341200B81E09401F85EB51' !=
'1234120078563412001F85EB51B81E0940'

----------------------------------------------------------------------
Ran 324 tests in 8.525s

Mancausoft
msg94460 - (view) Author: Mark Dickinson (mark.dickinson) Date: 2009-10-25 20:22
Hmm.  Okay, I take it back then. :)  Sorry for the noise.
History
Date User Action Args
2009-10-25 20:22:59mark.dickinsonsetmessages: + msg94460
2009-10-25 12:40:30mancausoftsetmessages: + msg94450
2009-10-25 08:11:32mark.dickinsonsetnosy: + mark.dickinson
messages: + msg94448
2009-10-24 23:52:39mancausoftcreate