classification
Title: Solaris ctypes_test failures
Type: behavior Stage:
Components: Tests Versions: Python 3.5, Python 3.4, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, christian.heimes, haypo, jcea, meador.inge, trent, yippi
Priority: normal Keywords:

Created on 2012-12-19 23:24 by yippi, last changed 2014-07-24 07:30 by BreamoreBoy.

Files
File name Uploaded Description Edit
ctypes.out yippi, 2012-12-19 23:24 python program and output showing failures
Messages (4)
msg177792 - (view) Author: yippi (yippi) Date: 2012-12-19 23:24
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.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.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?
msg206342 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-12-16 18:38
The ctypes issue also affects test_uuid. #19045 is a duplicate of this bug, too.

======================================================================
FAIL: test_ints (ctypes.test.test_bitfields.C_Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/cpython/buildslave/cc-32/3.x.snakebite-solaris11-amd64/build/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 "/home/cpython/buildslave/cc-32/3.x.snakebite-solaris11-amd64/build/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

======================================================================
FAIL: test_uuid4 (test.test_uuid.TestUUID)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/cpython/buildslave/cc-32/3.x.snakebite-solaris11-amd64/build/Lib/test/test_uuid.py", line 441, in test_uuid4
    equal(u.variant, uuid.RFC_4122)
AssertionError: 'reserved for Microsoft compatibility' != 'specified in RFC 4122'
- reserved for Microsoft compatibility
+ specified in RFC 4122
msg211499 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2014-02-18 09:08
Any progress on this issue? There are still failures on Solaris buildbots.
msg223813 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-24 07:30
Only one Solaris box was online when I looked and that had passed ctypes tests, but surely this will have been sorted out by now?
History
Date User Action Args
2014-07-24 07:30:12BreamoreBoysetnosy: + BreamoreBoy

messages: + msg223813
versions: + Python 3.5, - Python 3.3
2014-02-18 09:08:59hayposetnosy: + haypo
messages: + msg211499
2013-12-16 18:38:14christian.heimessetnosy: + christian.heimes

messages: + msg206342
versions: + Python 3.4, - Python 2.6
2013-01-01 16:48:18meador.ingesetnosy: + meador.inge
2012-12-20 08:37:53trentsetnosy: + trent
2012-12-19 23:43:45jceasetnosy: + jcea
2012-12-19 23:24:47yippicreate