[Python-Dev] test_ctypes failure on Mac OS X/PowerPC 10.3.9 (Panther)

Trent Mick trentm at activestate.com
Tue Jun 20 19:05:34 CEST 2006


Thomas and others,

Has anyone else seen failures in test_ctypes on older Mac OS X/PowerPC? 
Results are below. This is running a build of the trunk from last night:

	./configure && make && ./python.exe Lib/test/test_ctypes.py

Note that the test does NOT fail on the Mac OS X/x86 10.4.6 box that I have.

Trent

> $ ./python.exe Lib/test/test_ctypes.py
> /Users/trentm/src/python/Lib/ctypes/__init__.py:10: ImportWarning: Not importing directory '/Users/trentm/src/python/Modules/_ctypes': missing __init__.py
>   from _ctypes import Union, Structure, Array
> test_anon (ctypes.test.test_anon.AnonTest) ... ok
> test_anon_nonmember (ctypes.test.test_anon.AnonTest) ... ok
> test_anon_nonseq (ctypes.test.test_anon.AnonTest) ... ok
> test_nested (ctypes.test.test_anon.AnonTest) ... ok
> test (ctypes.test.test_array_in_pointer.Test) ... ok
> test_2 (ctypes.test.test_array_in_pointer.Test) ... ok
> test_classcache (ctypes.test.test_arrays.ArrayTestCase) ... ok
> test_from_address (ctypes.test.test_arrays.ArrayTestCase) ... ok
> test_from_addressW (ctypes.test.test_arrays.ArrayTestCase) ... ok
> test_numeric_arrays (ctypes.test.test_arrays.ArrayTestCase) ... ok
> test_simple (ctypes.test.test_arrays.ArrayTestCase) ... ok
> test_longlong (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_mixed_1 (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_mixed_2 (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_mixed_3 (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_multi_bitfields_size (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_nonint_types (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_signed (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_single_bitfield_size (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_ulonglong (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_unsigned (ctypes.test.test_bitfields.BitFieldTest) ... ok
> test_ints (ctypes.test.test_bitfields.C_Test) ... ok
> test_shorts (ctypes.test.test_bitfields.C_Test) ... ok
> test_buffer (ctypes.test.test_buffers.StringBufferTestCase) ... ok
> test_string_conversion (ctypes.test.test_buffers.StringBufferTestCase) ... ok
> test_unicode_buffer (ctypes.test.test_buffers.StringBufferTestCase) ... ok
> test_unicode_conversion (ctypes.test.test_buffers.StringBufferTestCase) ... ok
> test_endian_double (ctypes.test.test_byteswap.Test) ... ok
> test_endian_float (ctypes.test.test_byteswap.Test) ... ok
> test_endian_int (ctypes.test.test_byteswap.Test) ... ok
> test_endian_longlong (ctypes.test.test_byteswap.Test) ... ok
> test_endian_other (ctypes.test.test_byteswap.Test) ... ok
> test_endian_short (ctypes.test.test_byteswap.Test) ... ok
> test_struct_fields_1 (ctypes.test.test_byteswap.Test) ... ok
> test_struct_fields_2 (ctypes.test.test_byteswap.Test) ... ok
> test_struct_struct (ctypes.test.test_byteswap.Test) ... ok
> test_unaligned_native_struct_fields (ctypes.test.test_byteswap.Test) ... ok
> test_unaligned_nonnative_struct_fields (ctypes.test.test_byteswap.Test) ... ok
> test_byte (ctypes.test.test_callbacks.Callbacks) ... ok
> test_char (ctypes.test.test_callbacks.Callbacks) ... ok
> test_double (ctypes.test.test_callbacks.Callbacks) ... ok
> test_float (ctypes.test.test_callbacks.Callbacks) ... ok
> test_int (ctypes.test.test_callbacks.Callbacks) ... ok
> test_long (ctypes.test.test_callbacks.Callbacks) ... ok
> test_longlong (ctypes.test.test_callbacks.Callbacks) ... ok
> test_pyobject (ctypes.test.test_callbacks.Callbacks) ... ok
> test_short (ctypes.test.test_callbacks.Callbacks) ... ok
> test_ubyte (ctypes.test.test_callbacks.Callbacks) ... ok
> test_uint (ctypes.test.test_callbacks.Callbacks) ... ok
> test_ulong (ctypes.test.test_callbacks.Callbacks) ... ok
> test_ulonglong (ctypes.test.test_callbacks.Callbacks) ... ok
> test_ushort (ctypes.test.test_callbacks.Callbacks) ... ok
> test_integrate (ctypes.test.test_callbacks.SampleCallbacksTestCase) ... ok
> test_address2pointer (ctypes.test.test_cast.Test) ... ok
> test_array2pointer (ctypes.test.test_cast.Test) ... ok
> test_other (ctypes.test.test_cast.Test) ... ok
> test_p2a_objects (ctypes.test.test_cast.Test) ... ok
> test_byte (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_byte_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_callwithresult (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_double (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_double_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_float (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_float_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_int (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_int_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_long (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_long_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_longlong (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_longlong_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_short (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_short_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_ubyte (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_ubyte_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_uint (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_uint_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_ulong (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_ulong_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_ulonglong (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_ulonglong_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_ushort (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_ushort_plus (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_void (ctypes.test.test_cfuncs.CFunctions) ... ok
> test_checkretval (ctypes.test.test_checkretval.Test) ... ok
> test_gl (ctypes.test.test_find.Test_OpenGL_libs) ... ok
> test_glu (ctypes.test.test_find.Test_OpenGL_libs) ... ok
> test_glut (ctypes.test.test_find.Test_OpenGL_libs) ... ok
> test_basic (ctypes.test.test_funcptr.CFuncPtrTestCase) ... ok
> test_dllfunctions (ctypes.test.test_funcptr.CFuncPtrTestCase) ... ok
> test_first (ctypes.test.test_funcptr.CFuncPtrTestCase) ... ok
> test_structures (ctypes.test.test_funcptr.CFuncPtrTestCase) ... ok
> test_byval (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_callbacks (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_callbacks_2 (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_doubleresult (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_errors (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_floatresult (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_intresult (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_longlong_callbacks (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_longlongresult (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_mro (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_pointers (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_shorts (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_stringresult (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_struct_return_2H (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_struct_return_8H (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_voidresult (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_wchar_parm (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_wchar_result (ctypes.test.test_functions.FunctionTestCase) ... ok
> test_incomplete_example (ctypes.test.test_incomplete.MyTestCase) ... ok
> test_get (ctypes.test.test_init.InitTest) ... ok
> test_c_char_p (ctypes.test.test_internals.ObjectsTestCase) ... ok
> test_embedded_structs (ctypes.test.test_internals.ObjectsTestCase) ... ok
> test_ints (ctypes.test.test_internals.ObjectsTestCase) ... ok
> test_ptr_struct (ctypes.test.test_internals.ObjectsTestCase) ... ok
> test_simple_struct (ctypes.test.test_internals.ObjectsTestCase) ... ok
> test_xxx (ctypes.test.test_internals.ObjectsTestCase) ... ok
> test_cint_array (ctypes.test.test_keeprefs.ArrayTestCase) ... ok
> test_p_cint (ctypes.test.test_keeprefs.PointerTestCase) ... ok
> test (ctypes.test.test_keeprefs.PointerToStructure) ... ok
> test_ccharp (ctypes.test.test_keeprefs.SimpleTestCase) ... ok
> test_cint (ctypes.test.test_keeprefs.SimpleTestCase) ... ok
> test_ccharp_struct (ctypes.test.test_keeprefs.StructureTestCase) ... ok
> test_cint_struct (ctypes.test.test_keeprefs.StructureTestCase) ... ok
> test_struct_struct (ctypes.test.test_keeprefs.StructureTestCase) ... ok
> test_qsort (ctypes.test.test_libc.LibTest) ... ok
> test_sqrt (ctypes.test.test_libc.LibTest) ... ok
> test_find (ctypes.test.test_loading.LoaderTest) ... ERROR
> test_load (ctypes.test.test_loading.LoaderTest) ... ERROR
> test_find (ctypes.test.test_macholib.MachOTest) ... ok
> test_cast (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok
> test_memmove (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok
> test_memset (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok
> test_string_at (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok
> test_wstring_at (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok
> test_alignments (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_as_parameter (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_byref (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_char_from_address (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_default_init (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_float_from_address (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_floats (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_from_param (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_init (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_int_from_address (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_integers (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_signed_values (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_sizes (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_typeerror (ctypes.test.test_numbers.NumberTestCase) ... ok
> test_unsigned_values (ctypes.test.test_numbers.NumberTestCase) ... ok
> test (ctypes.test.test_objects.TestCase) ... ok
> test_array_pointers (ctypes.test.test_parameters.SimpleTypesTestCase) ... ok
> test_byref_pointer (ctypes.test.test_parameters.SimpleTypesTestCase) ... ok
> test_byref_pointerpointer (ctypes.test.test_parameters.SimpleTypesTestCase) ... ok
> test_cstrings (ctypes.test.test_parameters.SimpleTypesTestCase) ... ok
> test_cw_strings (ctypes.test.test_parameters.SimpleTypesTestCase) ... ok
> test_int_pointers (ctypes.test.test_parameters.SimpleTypesTestCase) ... ok
> test_subclasses (ctypes.test.test_parameters.SimpleTypesTestCase) ... ok
> test_basic (ctypes.test.test_pointers.PointersTestCase) ... ok
> test_basics (ctypes.test.test_pointers.PointersTestCase) ... ok
> test_bug_1467852 (ctypes.test.test_pointers.PointersTestCase) ... ok
> test_callbacks_with_pointers (ctypes.test.test_pointers.PointersTestCase) ... ok
> test_change_pointers (ctypes.test.test_pointers.PointersTestCase) ... ok
> Test that a character pointer-to-pointer is correctly passed ... ok
> test_from_address (ctypes.test.test_pointers.PointersTestCase) ... ok
> test_other (ctypes.test.test_pointers.PointersTestCase) ... ok
> test_pass_pointers (ctypes.test.test_pointers.PointersTestCase) ... ok
> test_pointer_crash (ctypes.test.test_pointers.PointersTestCase) ... ok
> test (ctypes.test.test_prototypes.ArrayTest) ... ok
> test_POINTER_c_char_arg (ctypes.test.test_prototypes.CharPointersTestCase) ... ok
> test_c_char_p_arg (ctypes.test.test_prototypes.CharPointersTestCase) ... ok
> test_c_void_p_arg (ctypes.test.test_prototypes.CharPointersTestCase) ... ok
> test_int_pointer_arg (ctypes.test.test_prototypes.CharPointersTestCase) ... ok
> test_POINTER_c_wchar_arg (ctypes.test.test_prototypes.WCharPointersTestCase) ... ok
> test_c_wchar_p_arg (ctypes.test.test_prototypes.WCharPointersTestCase) ... ok
> test_PyOS_snprintf (ctypes.test.test_python_api.PythonAPITestCase) ... ok
> test_PyObj_FromPtr (ctypes.test.test_python_api.PythonAPITestCase) ... ok
> test_PyString_FromString (ctypes.test.test_python_api.PythonAPITestCase) ... ok
> test_PyString_FromStringAndSize (ctypes.test.test_python_api.PythonAPITestCase) ... ok
> test_FloatDivisionError (ctypes.test.test_random_things.CallbackTracbackTestCase) ... ok
> test_IntegerDivisionError (ctypes.test.test_random_things.CallbackTracbackTestCase) ... ok
> test_TypeErrorDivisionError (ctypes.test.test_random_things.CallbackTracbackTestCase) ... ok
> test_ValueError (ctypes.test.test_random_things.CallbackTracbackTestCase) ... ok
> test_callback (ctypes.test.test_refcounts.AnotherLeak) ... ok
> test_1 (ctypes.test.test_refcounts.RefcountTestCase) ... ok
> test_refcount (ctypes.test.test_refcounts.RefcountTestCase) ... ok
> test_char (ctypes.test.test_repr.ReprTest) ... ok
> test_numbers (ctypes.test.test_repr.ReprTest) ... ok
> test_with_prototype (ctypes.test.test_returnfuncptrs.ReturnFuncPtrTestCase) ... ok
> test_without_prototype (ctypes.test.test_returnfuncptrs.ReturnFuncPtrTestCase) ... ok
> test_compare (ctypes.test.test_simplesubclasses.Test) ... ok
> test_ignore_retval (ctypes.test.test_simplesubclasses.Test) ... ok
> test_int_callback (ctypes.test.test_simplesubclasses.Test) ... ok
> test_int_struct (ctypes.test.test_simplesubclasses.Test) ... ok
> test_16 (ctypes.test.test_sizes.SizesTestCase) ... ok
> test_32 (ctypes.test.test_sizes.SizesTestCase) ... ok
> test_64 (ctypes.test.test_sizes.SizesTestCase) ... ok
> test_8 (ctypes.test.test_sizes.SizesTestCase) ... ok
> test_size_t (ctypes.test.test_sizes.SizesTestCase) ... ok
> test_char_array (ctypes.test.test_slicing.SlicesTestCase) ... ok
> test_char_ptr (ctypes.test.test_slicing.SlicesTestCase) ... ok
> test_char_ptr_with_free (ctypes.test.test_slicing.SlicesTestCase) ... ok
> test_getslice_cint (ctypes.test.test_slicing.SlicesTestCase) ... ok
> test_setslice_cint (ctypes.test.test_slicing.SlicesTestCase) ... ok
> test_wchar_ptr (ctypes.test.test_slicing.SlicesTestCase) ... ok
> test__POINTER_c_char (ctypes.test.test_stringptr.StringPtrTestCase) ... ok
> test__c_char_p (ctypes.test.test_stringptr.StringPtrTestCase) ... ok
> test_functions (ctypes.test.test_stringptr.StringPtrTestCase) ... ok
> test (ctypes.test.test_strings.StringArrayTestCase) ... ok
> test_c_buffer_raw (ctypes.test.test_strings.StringArrayTestCase) ... ok
> test_c_buffer_value (ctypes.test.test_strings.StringArrayTestCase) ... ok
> test_param_1 (ctypes.test.test_strings.StringArrayTestCase) ... ok
> test_param_2 (ctypes.test.test_strings.StringArrayTestCase) ... ok
> test (ctypes.test.test_strings.WStringArrayTestCase) ... ok
> test_wchar (ctypes.test.test_strings.WStringTestCase) ... ok
> test_1_A (ctypes.test.test_struct_fields.StructFieldsTestCase) ... ok
> test_1_B (ctypes.test.test_struct_fields.StructFieldsTestCase) ... ok
> test_2 (ctypes.test.test_struct_fields.StructFieldsTestCase) ... ok
> test_3 (ctypes.test.test_struct_fields.StructFieldsTestCase) ... ok
> test_4 (ctypes.test.test_struct_fields.StructFieldsTestCase) ... ok
> test (ctypes.test.test_structures.PointerMemberTestCase) ... ok
> test_abstract_class (ctypes.test.test_structures.StructureTestCase) ... ok
> test_emtpy (ctypes.test.test_structures.StructureTestCase) ... ok
> test_fields (ctypes.test.test_structures.StructureTestCase) ... ok
> test_init_errors (ctypes.test.test_structures.StructureTestCase) ... ok
> test_initializers (ctypes.test.test_structures.StructureTestCase) ... ok
> test_intarray_fields (ctypes.test.test_structures.StructureTestCase) ... ok
> test_invalid_field_types (ctypes.test.test_structures.StructureTestCase) ... ok
> test_keyword_initializers (ctypes.test.test_structures.StructureTestCase) ... ok
> test_methods (ctypes.test.test_structures.StructureTestCase) ... ok
> test_nested_initializers (ctypes.test.test_structures.StructureTestCase) ... ok
> test_packed (ctypes.test.test_structures.StructureTestCase) ... ok
> test_simple_structs (ctypes.test.test_structures.StructureTestCase) ... ok
> test_struct_alignment (ctypes.test.test_structures.StructureTestCase) ... ok
> test_structures_with_wchar (ctypes.test.test_structures.StructureTestCase) ... ok
> test_unions (ctypes.test.test_structures.StructureTestCase) ... ok
> test_subclass (ctypes.test.test_structures.SubclassesTest) ... ok
> test_subclass_delayed (ctypes.test.test_structures.SubclassesTest) ... ok
> test_native (ctypes.test.test_unaligned_structures.TestStructures) ... ok
> test_swapped (ctypes.test.test_unaligned_structures.TestStructures) ... ok
> test_ascii_ignore (ctypes.test.test_unicode.StringTestCase) ... ok
> test_ascii_replace (ctypes.test.test_unicode.StringTestCase) ... ok
> test_ascii_strict (ctypes.test.test_unicode.StringTestCase) ... ok
> test_buffers (ctypes.test.test_unicode.StringTestCase) ... ok
> test_latin1_strict (ctypes.test.test_unicode.StringTestCase) ... ok
> test_ascii_ignore (ctypes.test.test_unicode.UnicodeTestCase) ... ok
> test_ascii_replace (ctypes.test.test_unicode.UnicodeTestCase) ... ok
> test_ascii_strict (ctypes.test.test_unicode.UnicodeTestCase) ... ok
> test_buffers (ctypes.test.test_unicode.UnicodeTestCase) ... ok
> test_latin1_strict (ctypes.test.test_unicode.UnicodeTestCase) ... ok
> test_an_integer (ctypes.test.test_values.ValuesTestCase) ... ok
> test_undefined (ctypes.test.test_values.ValuesTestCase) ... ok
> test_array_invalid_length (ctypes.test.test_varsize_struct.VarSizeTest) ... ok
> test_resize (ctypes.test.test_varsize_struct.VarSizeTest) ... ok
> test_vararray_is_sane (ctypes.test.test_varsize_struct.VarSizeTest) ... ok
> test_varsized_array (ctypes.test.test_varsize_struct.VarSizeTest) ... ok
> test_zerosized_array (ctypes.test.test_varsize_struct.VarSizeTest) ... ok
> test_struct_by_value (ctypes.test.test_win32.Structures) ... ok
> 
> ======================================================================
> ERROR: test_find (ctypes.test.test_loading.LoaderTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/trentm/src/python/Lib/ctypes/test/test_loading.py", line 41, in test_find
>     cdll.LoadLibrary(lib)
>   File "/Users/trentm/src/python/Lib/ctypes/__init__.py", line 372, in LoadLibrary
>     return self._dlltype(name)
>   File "/Users/trentm/src/python/Lib/ctypes/__init__.py", line 290, in __init__
>     self._handle = _dlopen(self._name, mode)
> OSError: dlcompat: unable to open this file with RTLD_LOCAL
> 
> ======================================================================
> ERROR: test_load (ctypes.test.test_loading.LoaderTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/trentm/src/python/Lib/ctypes/test/test_loading.py", line 26, in test_load
>     CDLL(libc_name)
>   File "/Users/trentm/src/python/Lib/ctypes/__init__.py", line 290, in __init__
>     self._handle = _dlopen(self._name, mode)
> OSError: dlcompat: unable to open this file with RTLD_LOCAL
> 
> ----------------------------------------------------------------------
> Ran 258 tests in 0.377s
> 
> FAILED (errors=2)
> Traceback (most recent call last):
>   File "Lib/test/test_ctypes.py", line 12, in <module>
>     test_main()
>   File "Lib/test/test_ctypes.py", line 9, in test_main
>     run_suite(unittest.TestSuite(suites))
>   File "/Users/trentm/src/python/Lib/test/test_support.py", line 406, in run_suite
>     raise TestFailed(msg)
> test.test_support.TestFailed: errors occurred; run in verbose mode for details



-- 
Trent Mick
trentm at activestate.com


More information about the Python-Dev mailing list