mirror of
https://github.com/python/cpython.git
synced 2026-05-24 19:31:35 +00:00
"x86 OpenBSD trunk" buildbot due to changing Python so that
Python-exposed addresses are always non-negative.
test_int_pointer_arg(): This line failed now whenever the
box happened to assign an address to `ci` "with the sign
bit set":
self.failUnlessEqual(addressof(ci), func(byref(ci)))
The problem is that the ctypes addressof() inherited "all
addresses are non-negative now" from changes to
PyLong_FromVoidPtr(), but byref() did not inherit that
change and can still return a negative int.
I don't know whether, or what, the ctypes implementation wants
to do about that (possibly nothing), but in the meantime
the test fails frequently.
So, introduced a Python positive_address() function in
the test module, that takes a purported machine address and,
if negative, converts it to a non-negative value "with the
same bits". This should leave the test passing under all
versions of Python.
Belated thanks to Armin Rigo for teaching me the sick trick ;-)
for determining the # of bits in a machine pointer via abuse
of the struct module.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| runtests.py | ||
| test_array_in_pointer.py | ||
| test_arrays.py | ||
| test_bitfields.py | ||
| test_buffers.py | ||
| test_byteswap.py | ||
| test_callbacks.py | ||
| test_cast.py | ||
| test_cfuncs.py | ||
| test_checkretval.py | ||
| test_errcheck.py | ||
| test_funcptr.py | ||
| test_functions.py | ||
| test_incomplete.py | ||
| test_init.py | ||
| test_integers.py | ||
| test_internals.py | ||
| test_keeprefs.py | ||
| test_libc.py | ||
| test_loading.py | ||
| test_macholib.py | ||
| test_memfunctions.py | ||
| test_numbers.py | ||
| test_parameters.py | ||
| test_pointers.py | ||
| test_posix.py | ||
| test_prototypes.py | ||
| test_python_api.py | ||
| test_random_things.py | ||
| test_refcounts.py | ||
| test_repr.py | ||
| test_returnfuncptrs.py | ||
| test_simplesubclasses.py | ||
| test_sizes.py | ||
| test_slicing.py | ||
| test_stringptr.py | ||
| test_strings.py | ||
| test_struct_fields.py | ||
| test_structures.py | ||
| test_unaligned_structures.py | ||
| test_unicode.py | ||
| test_values.py | ||
| test_win32.py | ||