test_verify_dlopen_flags failure on OS X
Created originally on Bitbucket by danielj7 (Daniel Johnson)
I get the following test failure with cffi 1.0.0 through 1.1.0 on Mac OS X 10.10.3 with python 2.7.10 and 3.4.3. I got no test failures with cffi 0.8. Any ideas or suggestions for where I should look?
#!python
=================================== FAILURES ===================================
___________________________ test_verify_dlopen_flags ___________________________
def test_verify_dlopen_flags():
if not hasattr(sys, 'setdlopenflags'):
py.test.skip("requires sys.setdlopenflags()")
# Careful with RTLD_GLOBAL. If by chance the FFI is not deleted
# promptly, like on PyPy, then other tests may see the same
# exported symbols as well. So we must not export a simple name
# like 'foo'!
old = sys.getdlopenflags()
try:
ffi1 = FFI()
ffi1.cdef("int foo_verify_dlopen_flags;")
sys.setdlopenflags(ffi1.RTLD_GLOBAL | ffi1.RTLD_LAZY)
lib1 = ffi1.verify("int foo_verify_dlopen_flags;")
lib2 = get_second_lib()
lib1.foo_verify_dlopen_flags = 42
> assert lib2.foo_verify_dlopen_flags == 42
E assert 0 == 42
E + where 0 = <Lib object for 'verify336'>.foo_verify_dlopen_flags
testing/cffi1/test_verify1.py:2126: AssertionError
----------------------------- Captured stderr call -----------------------------
/sw/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'flags'
warnings.warn(msg)
======== 1 failed, 1429 passed, 83 skipped, 4 xfailed in 247.19 seconds ========