[New-bugs-announce] [issue16733] Solaris ctypes_test failures

yippi report at bugs.python.org
Thu Dec 20 00:24:47 CET 2012


New submission from yippi:

Note I am building Python 3.3 with the Sun Studio compiler on Solaris 11.  When I run the tests, I get these 2 ctypes errors:

======================================================================
FAIL: test_ints (ctypes.test.test_bitfields.C_Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builds/bacamero/ul/components/python/python33/Python-3.3.0/Lib/ctypes/test/test_bitfields.py", line 40, in test_ints
    self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii')))
AssertionError: -1 != 1
======================================================================
FAIL: test_shorts (ctypes.test.test_bitfields.C_Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builds/bacamero/ul/components/python/python33/Python-3.3.0/Lib/ctypes/test/test_bitfields.py", line 47, in test_shorts
    self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii')))
AssertionError: -32 != 32
----------------------------------------------------------------------

I see almost identical errors in Python 2.6 and 2.7.  The same two tests fail, though the format of the error message is a bit different.  For example it looks like this in 2.7:
AssertionError: Tuples differ: ('A', 1, -1) != ('A', 1, 1)
AssertionError: Tuples differ: ('R', 32, -32) != ('R', 32, 32)

I made a simple standalone test program that prints out all the values
instead of stopping on first failure.  The script and output is attached
for reference. 

I think this might be related to issue #16275.  On Solaris 11 we are building Python with the configure --with -system-ffi argument.  On Solaris 11, libffi 3.0.9 is used.  I tried updating libffi to the latest 3.0.11 version and rebuilding, but that did not help.

Any pointers about how to debug this would be helpful.  It is not clear to me if this is a libffi issue, a compiler issue, a problem in Python or something else.  Is there any additional information I could provide to help track this down?

----------
components: Tests
files: ctypes.out
messages: 177792
nosy: yippi
priority: normal
severity: normal
status: open
title: Solaris ctypes_test failures
type: behavior
versions: Python 2.6, Python 2.7, Python 3.3
Added file: http://bugs.python.org/file28371/ctypes.out

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16733>
_______________________________________


More information about the New-bugs-announce mailing list