test failures on aarch64-linux-gnu
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-cffi (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
test failures on aarch64-linux-gnu
see https:/
=======
_______
self = <testing.
def test_wchar_
ffi = FFI(backend=
p = ffi.cast("int", ffi.cast("wchar_t", u+'\u1234'))
assert int(p) == 0x1234
p = ffi.cast("long long", ffi.cast("wchar_t", -1))
if SIZE_OF_WCHAR == 2: # 2 bytes, unsigned
assert int(p) == 0xffff
else: # 4 bytes, signed
> assert int(p) == -1
E assert 4294967295 == -1
E + where 4294967295 = int(<cdata 'long long' 4294967295>)
testing/
________________ TestBitfield.
self = <testing.
@pytest.
def test_bitfield_
L = FFI().alignof("long long")
> self.check("char y; int :1;", 0, 1, 2)
testing/
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <testing.
source = 'char y; int :1;', expected_ofs_y = 0, expected_align = 1
expected_size = 2
def check(self, source, expected_ofs_y, expected_align, expected_size):
# NOTE: 'expected_*' is the numbers expected from GCC.
# The numbers expected from MSVC are not explicitly written
# in this file, and will just be taken from the compiler.
ffi = FFI()
ctype = ffi.typeof("struct s1")
# verify the information with gcc
ffi1 = FFI()
""")
fnames = [name for name, cfield in ctype.fields
setters = ['case %d: s.%s = value; break;' % iname
lib = ffi1.verify("""
{
}
""" % (source, ' '.join(setters)))
if sys.platform == 'win32':
else:
> assert (lib.Gofs_y, lib.Galign, lib.Gsize) == (
E assert (0L, 4L, 4L) == (0, 1, 2)
E At index 1 diff: 4L != 1
testing/
_______
self = <testing.
@pytest.
def test_bitfield_
L = FFI().alignof("long long")
> self.check("char y; int :0;", 0, 1, 4)
testing/
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <testing.
source = 'char y; int :0;', expected_ofs_y = 0, expected_align = 1
expected_size = 4
def check(self, source, expected_ofs_y, expected_align, expected_size):
# NOTE: 'expected_*' is the numbers expected from GCC.
# The numbers expected from MSVC are not explicitly written
# in this file, and will just be taken from the compiler.
ffi = FFI()
ctype = ffi.typeof("struct s1")
# verify the information with gcc
ffi1 = FFI()
""")
fnames = [name for name, cfield in ctype.fields
setters = ['case %d: s.%s = value; break;' % iname
lib = ffi1.verify("""
{
}
""" % (source, ' '.join(setters)))
if sys.platform == 'win32':
else:
> assert (lib.Gofs_y, lib.Galign, lib.Gsize) == (
E assert (0L, 4L, 4L) == (0, 1, 4)
E At index 1 diff: 4L != 1
testing/
============= 3 failed, 1038 passed, 50 skipped in 235.30 seconds ==============
Forwarded: https:/ /bitbucket. org/cffi/ cffi/issue/ 136/cffi- tests-fail- on-aarch64