[pypy-commit] cffi default: fix when running this test in the same process as ../cffi0/test_verify.py (found on os/x, but I don't know why it doesn't also fail on linux)

arigo pypy.commits at gmail.com
Sat Jan 16 11:29:31 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r2602:95386637958b
Date: 2016-01-16 17:25 +0100
http://bitbucket.org/cffi/cffi/changeset/95386637958b/

Log:	fix when running this test in the same process as
	../cffi0/test_verify.py (found on os/x, but I don't know why it
	doesn't also fail on linux)

diff --git a/testing/cffi1/test_verify1.py b/testing/cffi1/test_verify1.py
--- a/testing/cffi1/test_verify1.py
+++ b/testing/cffi1/test_verify1.py
@@ -2091,20 +2091,20 @@
     old = sys.getdlopenflags()
     try:
         ffi1 = FFI()
-        ffi1.cdef("int foo_verify_dlopen_flags;")
+        ffi1.cdef("int foo_verify_dlopen_flags_1;")
         sys.setdlopenflags(ffi1.RTLD_GLOBAL | ffi1.RTLD_NOW)
-        lib1 = ffi1.verify("int foo_verify_dlopen_flags;")
+        lib1 = ffi1.verify("int foo_verify_dlopen_flags_1;")
     finally:
         sys.setdlopenflags(old)
 
     ffi2 = FFI()
     ffi2.cdef("int *getptr(void);")
     lib2 = ffi2.verify("""
-        extern int foo_verify_dlopen_flags;
-        static int *getptr(void) { return &foo_verify_dlopen_flags; }
+        extern int foo_verify_dlopen_flags_1;
+        static int *getptr(void) { return &foo_verify_dlopen_flags_1; }
     """)
     p = lib2.getptr()
-    assert ffi1.addressof(lib1, 'foo_verify_dlopen_flags') == p
+    assert ffi1.addressof(lib1, 'foo_verify_dlopen_flags_1') == p
 
 def test_consider_not_implemented_function_type():
     ffi = FFI()


More information about the pypy-commit mailing list