As you can see here https://launchpadlibrarian.net/385898413/buildlog_ubuntu-cosmic-i386.python-cffi_1.11.5-2_BUILDING.txt.gz python-cffi fails tests in the development version of Ubuntu, like this:
def test_dlopen_filename(self): path = ctypes.util.find_library(lib_m) if not path: py.test.skip("%s not found" % lib_m) ffi = FFI(backend=self.Backend()) ffi.cdef(""" double cos(double x); """) m = ffi.dlopen(path) x = m.cos(1.23) > assert x == math.cos(1.23) E assert nan == 0.3342377271245026 E + where 0.3342377271245026 = <built-in function cos>(1.23) E + where <built-in function cos> = math.cos
What's going on here is that this runs after test_sin_no_return_value and that test lies about the return value of sin. This means that the x87 stack is not cleaned up after sin returns, in violation of the calling convention, and now for some reason the cos function in glibc fails if it is called with an unclean x87 stack.
I'm not sure how this can be fixed -- always clean the x87 stack after function return? -- but it seems a niche feature to me and perhaps the test can just be skipped on ia32 until x87 can be forgotten about entirely.