[Python-Dev] test failures in test_ctypes (HEAD)

Thomas Heller theller at python.net
Tue May 2 19:57:32 CEST 2006


Guido van Rossum wrote:
> I see test failures in current HEAD on my Google Red Hat Linux desktop
> that the buildbots don't seem to have:
> 
> ./python -E -tt ../Lib/test/regrtest.py test_ctypes
> test_ctypes
> test test_ctypes failed -- errors occurred; run in verbose mode for details
> 
> More details from running this manually:
> $ ./python ../Lib/test/test_ctypes.py
> .
> . (lots of passing tests; then:)
> .
> test_gl (ctypes.test.test_find.Test_OpenGL_libs) ... ERROR
> test_glu (ctypes.test.test_find.Test_OpenGL_libs) ... ERROR
> test_glut (ctypes.test.test_find.Test_OpenGL_libs) ... ERROR

Can you try this patch for Lib/ctypes/test/test_find, please?

Index: test_find.py
===================================================================
--- test_find.py	(Revision 45791)
+++ test_find.py	(Arbeitskopie)
@@ -39,9 +39,9 @@
         if lib_glu:
             self.glu = CDLL(lib_glu, RTLD_GLOBAL)
         if lib_glut:
-            self.glut = CDLL(lib_glut)
+            self.glut = CDLL(lib_glut, RTLD_GLOBAL)
         if lib_gle:
-            self.gle = CDLL(lib_gle)
+            self.gle = CDLL(lib_gle, RTLD_GLOBAL)
 
     if lib_gl:
         def test_gl(self):


The test should try to test the RTLD_GLOBAL flag for loading shared libs.
(The patch is pure guesswork, inspired by a recent thread on the ctypes-users list.
It would be great if someone could provide some insight into this, or suggest
a better test).

Thomas



More information about the Python-Dev mailing list