pypy/module/fcntl/test/test_fcntl.py::AppTestFcntl::()::test_ioctl
self = <CallInfo when='call' exception: expected ctypes_Array of Char {'nolength': True} *0 instead of LP_ctypes_Array of Char {'nolength': True} *0>
func = <function <lambda> at 0x00007fd9729d1f88>, when = 'call'
def __init__(self, func, when):
#: context of invocation: one of "setup", "call",
#: "teardown", "memocollect"
self.when = when
self.start = time()
try:
> self.result = func()
../_pytest/runner.py:150:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> return CallInfo(lambda: ihook(item=item, **kwds), when=when)
../_pytest/runner.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_call'>
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ioctl'>}
def __call__(self, **kwargs):
assert not self.is_historic()
> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../_pytest/vendored_packages/pluggy.py:724:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x00007fd96006c9f8>
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x00007fd94002c6a0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ioctl'>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
../_pytest/vendored_packages/pluggy.py:338:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x00007fd94002c6a0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ioctl'>}
self._inner_hookexec = lambda hook, methods, kwargs: \
> _MultiCall(methods, kwargs, hook.spec_opts).execute()
../_pytest/vendored_packages/pluggy.py:333:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
../_pytest/vendored_packages/pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_call at 0x00007fd9730150d8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
../_pytest/vendored_packages/pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x00007fd96477c2a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
../_pytest/vendored_packages/pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x00007fd96477c2a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>
def __init__(self, func):
try:
> self.result = func()
../_pytest/vendored_packages/pluggy.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
../_pytest/vendored_packages/pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_call at 0x00007fd973014f48>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
../_pytest/vendored_packages/pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x00007fd96477c260>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
../_pytest/vendored_packages/pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x00007fd96477c260>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>
def __init__(self, func):
try:
> self.result = func()
../_pytest/vendored_packages/pluggy.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ioctl'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
return _wrapped_call(hook_impl.function(*args), self.execute)
> res = hook_impl.function(*args)
../_pytest/vendored_packages/pluggy.py:596:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <AppTestMethod 'test_ioctl'>
def pytest_runtest_call(item):
try:
> item.runtest()
../_pytest/runner.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <AppTestMethod 'test_ioctl'>
def runtest(self):
target = self.obj
src = extract_docstring_if_empty_function(target.im_func)
space = target.im_self.space
if self.config.option.runappdirect:
appexec_definitions = self.parent.obj.__dict__
spaceconfig = getattr(self.parent.obj, 'spaceconfig', None)
usemodules = spaceconfig.get('usemodules') if spaceconfig else None
return run_with_python(self.config.option.python, src, usemodules,
**appexec_definitions)
filename = self._getdynfilename(target)
func = app2interp_temp(src, filename=filename)
w_instance = self.parent.w_instance
> self.execute_appex(space, func, space, w_instance)
tool/pytest/apptest.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <AppTestMethod 'test_ioctl'>, space = StdObjSpace
target = <function test_ioctl at 0x00007fd9729db2e0>
args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00007fd9512817f8>)
def execute_appex(self, space, target, *args):
self.space = space
space.getexecutioncontext().set_sys_exc_info(None)
try:
> target(*args)
tool/pytest/apptest.py:267:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00007fd9512817f8>,)
w_func = <Function test_ioctl>
args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00007fd9512817f8>
def appcaller(space, *args_w):
if not isinstance(space, ObjSpace):
raise TypeError("first argument must be a space instance.")
# the last argument can be an Arguments
w_func = self.wget(space, name)
if not args_w:
return space.call_function(w_func)
else:
args = args_w[-1]
assert args is not None
if not isinstance(args, Arguments):
> return space.call_function(w_func, *args_w)
interpreter/gateway.py:1409:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace, w_func = <Function test_ioctl>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00007fd9512817f8>,)
nargs = 1, Function = <class 'pypy.interpreter.function.Function'>
_Method = <class 'pypy.interpreter.function._Method'>
def call_function(self, w_func, *args_w):
nargs = len(args_w) # used for pruning funccall versions
if not self.config.objspace.disable_call_speedhacks and nargs < 5:
# start of hack for performance
from pypy.interpreter.function import Function, _Method
if isinstance(w_func, _Method):
if nargs < 4:
func = w_func.w_function
if isinstance(func, Function):
return func.funccall(w_func.w_instance, *args_w)
if isinstance(w_func, Function):
> return w_func.funccall(*args_w)
interpreter/baseobjspace.py:1234:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Function test_ioctl>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00007fd9512817f8>,)
gateway = <module 'pypy.interpreter.gateway' from '/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/gateway.pyc'>
PyCode = <class 'pypy.interpreter.pycode.PyCode'>
code = <code object test_ioctl, file "[/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1>
def funccall(self, *args_w): # speed hack
from pypy.interpreter import gateway
from pypy.interpreter.pycode import PyCode
code = self.getcode() # hook for the jit
nargs = len(args_w)
fast_natural_arity = code.fast_natural_arity
if nargs == fast_natural_arity:
if nargs == 0:
assert isinstance(code, gateway.BuiltinCode0)
return code.fastcall_0(self.space, self)
elif nargs == 1:
assert isinstance(code, gateway.BuiltinCode1)
return code.fastcall_1(self.space, self, args_w[0])
elif nargs == 2:
assert isinstance(code, gateway.BuiltinCode2)
return code.fastcall_2(self.space, self, args_w[0], args_w[1])
elif nargs == 3:
assert isinstance(code, gateway.BuiltinCode3)
return code.fastcall_3(self.space, self, args_w[0],
args_w[1], args_w[2])
elif nargs == 4:
assert isinstance(code, gateway.BuiltinCode4)
return code.fastcall_4(self.space, self, args_w[0],
args_w[1], args_w[2], args_w[3])
elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity:
assert isinstance(code, PyCode)
if nargs < 5:
new_frame = self.space.createframe(code, self.w_func_globals,
self)
for i in funccallunrolling:
if i < nargs:
new_frame.locals_cells_stack_w[i] = args_w[i]
> return new_frame.run(self.name, self.qualname)
interpreter/function.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
name = 'test_ioctl', qualname = 'test_ioctl'
def run(self, name=None, qualname=None):
"""Start this frame's execution."""
if self._is_generator_or_coroutine():
return self.initialize_as_generator(name, qualname)
else:
> return self.execute_frame()
interpreter/pyframe.py:256:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
w_arg_or_err = None
def execute_frame(self, w_arg_or_err=None):
"""Execute this frame. Main entry point to the interpreter.
'w_arg_or_err' is non-None iff we are starting or resuming
a generator or coroutine frame; in that case, w_arg_or_err
is the input argument -or- an SApplicationException instance.
"""
from pypy.interpreter import pyopcode as pyopcode
# the following 'assert' is an annotation hint: it hides from
# the annotator all methods that are defined in PyFrame but
# overridden in the {,Host}FrameClass subclasses of PyFrame.
assert (isinstance(self, self.space.FrameClass) or
not self.space.config.translating)
executioncontext = self.space.getexecutioncontext()
executioncontext.enter(self)
got_exception = True
w_exitvalue = self.space.w_None
try:
executioncontext.call_trace(self)
#
# Execution starts just after the last_instr. Initially,
# last_instr is -1. After a generator suspends it points to
# the YIELD_VALUE/YIELD_FROM instruction.
try:
try:
if w_arg_or_err is None:
assert self.last_instr == -1
next_instr = r_uint(0)
else:
next_instr = self.resume_execute_frame(w_arg_or_err)
except pyopcode.Yield:
w_exitvalue = self.popvalue()
else:
w_exitvalue = self.dispatch(self.pycode, next_instr,
executioncontext)
except OperationError:
raise
except Exception as e: # general fall-back
> raise self._convert_unexpected_exception(e)
interpreter/pyframe.py:353:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
e = TypeError("expected ctypes_Array of Char {'nolength': True} *0 instead of LP_ctypes_Array of Char {'nolength': True} *0",)
def _convert_unexpected_exception(self, e):
from pypy.interpreter import error
> operr = error.get_converted_unexpected_exception(self.space, e)
interpreter/pyframe.py:844:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
w_arg_or_err = None
def execute_frame(self, w_arg_or_err=None):
"""Execute this frame. Main entry point to the interpreter.
'w_arg_or_err' is non-None iff we are starting or resuming
a generator or coroutine frame; in that case, w_arg_or_err
is the input argument -or- an SApplicationException instance.
"""
from pypy.interpreter import pyopcode as pyopcode
# the following 'assert' is an annotation hint: it hides from
# the annotator all methods that are defined in PyFrame but
# overridden in the {,Host}FrameClass subclasses of PyFrame.
assert (isinstance(self, self.space.FrameClass) or
not self.space.config.translating)
executioncontext = self.space.getexecutioncontext()
executioncontext.enter(self)
got_exception = True
w_exitvalue = self.space.w_None
try:
executioncontext.call_trace(self)
#
# Execution starts just after the last_instr. Initially,
# last_instr is -1. After a generator suspends it points to
# the YIELD_VALUE/YIELD_FROM instruction.
try:
try:
if w_arg_or_err is None:
assert self.last_instr == -1
next_instr = r_uint(0)
else:
next_instr = self.resume_execute_frame(w_arg_or_err)
except pyopcode.Yield:
w_exitvalue = self.popvalue()
else:
w_exitvalue = self.dispatch(self.pycode, next_instr,
> executioncontext)
interpreter/pyframe.py:349:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
pycode = <code object test_ioctl, file "[/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1>
next_instr = 180
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00007fd972805360>
def dispatch(self, pycode, next_instr, ec):
# For the sequel, force 'next_instr' to be unsigned for performance
next_instr = r_uint(next_instr)
co_code = pycode.co_code
try:
while True:
assert next_instr & 1 == 0
> next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter/pyopcode.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
co_code = 'd\x01d\x00l\x00}\x01d\x01d\x00l\x01}\x02d\x01d\x00l\x02}\x03d\x01d\x00l\x03}\x04d\x01d\x00l\x04}\x05\t\x00d\x01d\x02l...e0J\x00\x82\x01|\x03\xa0\x11|\x08\xa1\x01\x01\x00d\x00S\x00#\x00|\x03\xa0\x11|\x08\xa1\x01\x01\x00w\x00&\x03Y\x00w\x01'
next_instr = 180
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00007fd972805360>
def handle_bytecode(self, co_code, next_instr, ec):
try:
> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter/pyopcode.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
co_code = 'd\x01d\x00l\x00}\x01d\x01d\x00l\x01}\x02d\x01d\x00l\x02}\x03d\x01d\x00l\x03}\x04d\x01d\x00l\x04}\x05\t\x00d\x01d\x02l...e0J\x00\x82\x01|\x03\xa0\x11|\x08\xa1\x01\x01\x00d\x00S\x00#\x00|\x03\xa0\x11|\x08\xa1\x01\x01\x00w\x00&\x03Y\x00w\x01'
next_instr = 220L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00007fd972805360>
@jit.unroll_safe
def dispatch_bytecode(self, co_code, next_instr, ec):
while True:
assert next_instr & 1 == 0
self.last_instr = intmask(next_instr)
if jit.we_are_jitted():
ec.bytecode_only_trace(self)
else:
ec.bytecode_trace(self)
next_instr = r_uint(self.last_instr)
assert next_instr & 1 == 0
opcode = ord(co_code[next_instr])
oparg = ord(co_code[next_instr + 1])
next_instr += 2
# note: the structure of the code here is such that it makes
# (after translation) a big "if/elif" chain, which is then
# turned into a switch().
while opcode == opcodedesc.EXTENDED_ARG.index:
opcode = ord(co_code[next_instr])
arg = ord(co_code[next_instr + 1])
if opcode < HAVE_ARGUMENT:
raise BytecodeCorruption
next_instr += 2
oparg = (oparg * 256) | arg
if opcode == opcodedesc.RETURN_VALUE.index:
self.frame_finished_execution = True # for generators
raise Return
elif opcode == opcodedesc.JUMP_ABSOLUTE.index:
return self.jump_absolute(oparg, next_instr, ec)
elif opcode == opcodedesc.RERAISE.index:
return self.RERAISE(oparg, next_instr)
elif opcode == opcodedesc.FOR_ITER.index:
next_instr = self.FOR_ITER(oparg, next_instr)
elif opcode == opcodedesc.JUMP_FORWARD.index:
next_instr = self.JUMP_FORWARD(oparg, next_instr)
elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index:
return self.JUMP_IF_FALSE_OR_POP(oparg, next_instr, ec)
elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index:
return self.JUMP_IF_TRUE_OR_POP(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index:
return self.POP_JUMP_IF_FALSE(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index:
return self.POP_JUMP_IF_TRUE(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_FORWARD_IF_NONE.index:
next_instr = self.POP_JUMP_FORWARD_IF_NONE(oparg, next_instr)
elif opcode == opcodedesc.POP_JUMP_FORWARD_IF_NOT_NONE.index:
next_instr = self.POP_JUMP_FORWARD_IF_NOT_NONE(oparg, next_instr)
elif opcode == opcodedesc.JUMP_IF_NOT_EXC_MATCH.index:
next_instr = self.JUMP_IF_NOT_EXC_MATCH(oparg, next_instr)
elif opcode == opcodedesc.BINARY_ADD.index:
self.BINARY_ADD(oparg, next_instr)
elif opcode == opcodedesc.BINARY_AND.index:
self.BINARY_AND(oparg, next_instr)
elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index:
self.BINARY_FLOOR_DIVIDE(oparg, next_instr)
elif opcode == opcodedesc.BINARY_MATRIX_MULTIPLY.index:
self.BINARY_MATRIX_MULTIPLY(oparg, next_instr)
elif opcode == opcodedesc.BINARY_LSHIFT.index:
self.BINARY_LSHIFT(oparg, next_instr)
elif opcode == opcodedesc.BINARY_MODULO.index:
self.BINARY_MODULO(oparg, next_instr)
elif opcode == opcodedesc.BINARY_MULTIPLY.index:
self.BINARY_MULTIPLY(oparg, next_instr)
elif opcode == opcodedesc.BINARY_OR.index:
self.BINARY_OR(oparg, next_instr)
elif opcode == opcodedesc.BINARY_POWER.index:
self.BINARY_POWER(oparg, next_instr)
elif opcode == opcodedesc.BINARY_RSHIFT.index:
self.BINARY_RSHIFT(oparg, next_instr)
elif opcode == opcodedesc.BINARY_SUBSCR.index:
self.BINARY_SUBSCR(oparg, next_instr)
elif opcode == opcodedesc.BINARY_SUBTRACT.index:
self.BINARY_SUBTRACT(oparg, next_instr)
elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index:
self.BINARY_TRUE_DIVIDE(oparg, next_instr)
elif opcode == opcodedesc.BINARY_XOR.index:
self.BINARY_XOR(oparg, next_instr)
elif opcode == opcodedesc.BUILD_CONST_KEY_MAP.index:
self.BUILD_CONST_KEY_MAP(oparg, next_instr)
elif opcode == opcodedesc.BUILD_LIST.index:
self.BUILD_LIST(oparg, next_instr)
elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index:
self.BUILD_LIST_FROM_ARG(oparg, next_instr)
elif opcode == opcodedesc.BUILD_MAP.index:
self.BUILD_MAP(oparg, next_instr)
elif opcode == opcodedesc.BUILD_SET.index:
self.BUILD_SET(oparg, next_instr)
elif opcode == opcodedesc.BUILD_SLICE.index:
self.BUILD_SLICE(oparg, next_instr)
elif opcode == opcodedesc.BUILD_TUPLE.index:
self.BUILD_TUPLE(oparg, next_instr)
elif opcode == opcodedesc.CALL_FUNCTION.index:
self.CALL_FUNCTION(oparg, next_instr)
elif opcode == opcodedesc.CALL_FUNCTION_KW.index:
self.CALL_FUNCTION_KW(oparg, next_instr)
elif opcode == opcodedesc.CALL_FUNCTION_EX.index:
self.CALL_FUNCTION_EX(oparg, next_instr)
elif opcode == opcodedesc.CALL_METHOD.index:
> self.CALL_METHOD(oparg, next_instr)
interpreter/pyopcode.py:296:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
oparg = 4, ignored = (220L,), n_args = 4, w_self = None, n = 4
@jit.unroll_safe
def CALL_METHOD(f, oparg, *ignored):
# opargs contains the arg, and kwarg count, excluding the implicit 'self'
n_args = oparg
w_self = f.peekvalue_maybe_none(n_args)
n = n_args + (w_self is not None)
w_callable = f.peekvalue(n_args + 1)
w_result = f.space.call_valuestack(
> w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args+2)
objspace/std/callmethod.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace, w_func = <BuiltinFunction ioctl>, nargs = 4
frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
dropvalues = 6, methodcall = False
def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False):
# methodcall is only used for better error messages in argument.py
from pypy.interpreter.function import Function, _Method, is_builtin_code
if frame.get_is_being_profiled() and is_builtin_code(w_func):
# XXX: this code is copied&pasted :-( from the slow path below
# call_valuestack().
args = frame.make_arguments(nargs, w_function=w_func)
frame.dropvalues(dropvalues)
return self.call_args_and_c_profile(frame, w_func, args)
if not self.config.objspace.disable_call_speedhacks:
# start of hack for performance
if isinstance(w_func, _Method):
# reuse callable stack place for w_inst
frame.settopvalue(w_func.w_instance, nargs)
nargs += 1
methodcall = True
w_func = w_func.w_function
if isinstance(w_func, Function):
return w_func.funccall_valuestack(
> nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter/baseobjspace.py:1261:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <BuiltinFunction ioctl>, nargs = 4
frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ioctl, f...cos-x86-64/build/pypy/module/fcntl/test/test_fcntl.py:197]", line 1> at line 28
dropvalues = 6, methodcall = False
def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack
# methodcall is only for better error messages
from pypy.interpreter import gateway
from pypy.interpreter.pycode import PyCode
code = self.getcode() # hook for the jit
#
if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info
and nargs == 0):
frame.dropvalues(dropvalues)
from pypy.module.sys.vm import exc_info_direct
return exc_info_direct(self.space, frame)
#
fast_natural_arity = code.fast_natural_arity
if nargs == fast_natural_arity:
if nargs == 0:
frame.dropvalues(dropvalues)
assert isinstance(code, gateway.BuiltinCode0)
return code.fastcall_0(self.space, self)
elif nargs == 1:
f_0 = frame.peekvalue(0)
frame.dropvalues(dropvalues)
assert isinstance(code, gateway.BuiltinCode1)
return code.fastcall_1(self.space, self, f_0)
elif nargs == 2:
f_0 = frame.peekvalue(0)
f_1 = frame.peekvalue(1)
frame.dropvalues(dropvalues)
assert isinstance(code, gateway.BuiltinCode2)
return code.fastcall_2(self.space, self, f_1, f_0)
elif nargs == 3:
assert isinstance(code, gateway.BuiltinCode3)
f_0 = frame.peekvalue(0)
f_1 = frame.peekvalue(1)
f_2 = frame.peekvalue(2)
frame.dropvalues(dropvalues)
return code.fastcall_3(self.space, self, f_2,
f_1, f_0)
elif nargs == 4:
assert isinstance(code, gateway.BuiltinCode4)
f_0 = frame.peekvalue(0)
f_1 = frame.peekvalue(1)
f_2 = frame.peekvalue(2)
f_3 = frame.peekvalue(3)
frame.dropvalues(dropvalues)
> return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0)
interpreter/function.py:184:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode4 object at 0x00007fd961c7da28>
space = StdObjSpace, func = <BuiltinFunction ioctl>, w1 = W_IntObject(13)
w2 = W_IntObject(1074033783)
w3 = <pypy.module.array.interp_array.W_ArrayTypei object at 0x00007fd9620b9478>
w4 = W_BoolObject(True)
@signature(sigtypes.self(), sigtypes.any(),
w_root_or_none,
w_root_or_none,
w_root_or_none,
w_root_or_none,
w_root_or_none,
returns=w_root_or_none)
def fastcall_4(self, space, func, w1, w2, w3, w4):
from rpython.rlib.debug import check_annotation
try:
w_result = self.fastfunc_4(space, w1, w2, w3, w4)
except DescrMismatch:
return self._type_unwrap_mismatch(space,
Arguments(space,
[w1, w2, w3, w4]))
except Exception as e:
> self.handle_exception(space, e)
interpreter/gateway.py:1058:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode4 object at 0x00007fd961c7da28>
space = StdObjSpace
e = TypeError("expected ctypes_Array of Char {'nolength': True} *0 instead of LP_ctypes_Array of Char {'nolength': True} *0",)
def handle_exception(self, space, e):
try:
if not we_are_translated():
raise
raise e
except OperationError:
raise
except Exception as e: # general fall-back
from pypy.interpreter import error
> raise error.get_converted_unexpected_exception(space, e)
interpreter/gateway.py:908:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode4 object at 0x00007fd961c7da28>
space = StdObjSpace, func = <BuiltinFunction ioctl>, w1 = W_IntObject(13)
w2 = W_IntObject(1074033783)
w3 = <pypy.module.array.interp_array.W_ArrayTypei object at 0x00007fd9620b9478>
w4 = W_BoolObject(True)
@signature(sigtypes.self(), sigtypes.any(),
w_root_or_none,
w_root_or_none,
w_root_or_none,
w_root_or_none,
w_root_or_none,
returns=w_root_or_none)
def fastcall_4(self, space, func, w1, w2, w3, w4):
from rpython.rlib.debug import check_annotation
try:
> w_result = self.fastfunc_4(space, w1, w2, w3, w4)
interpreter/gateway.py:1052:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace, w0 = W_IntObject(13), w1 = W_IntObject(1074033783)
w2 = <pypy.module.array.interp_array.W_ArrayTypei object at 0x00007fd9620b9478>
w3 = W_BoolObject(True)
def fastfunc_ioctl_4(space, w0, w1, w2, w3):
> return func(space, w0, w1, w2, space.gateway_int_w(w3))
<2848-codegen /Users/matti/build-worker-x86_64/own-macos-x86-64/build/rpython/tool/sourcetools.py:174>:3:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace, w_fd = W_IntObject(13), w_request = W_IntObject(1074033783)
w_arg = <pypy.module.array.interp_array.W_ArrayTypei object at 0x00007fd9620b9478>
mutate_flag = 1
@unwrap_spec(mutate_flag=int, w_arg=WrappedDefault(0))
def ioctl(space, w_fd, w_request, w_arg, mutate_flag=-1):
"""ioctl(fd, op[, arg[, mutate_flag]])
Perform the operation op on file descriptor fd. The values used for op
are operating system dependent, and are available as constants in the
fcntl or termios library modules, using the same names as used in the
relevant C header files.
The argument arg is optional, and defaults to 0; it may be an int or a
buffer containing character data (most likely a string or an array).
If the argument is a mutable buffer (such as an array) and if the
mutate_flag argument (which is only allowed in this case) is true then the
buffer is (in effect) passed to the operating system and changes made by
the OS will be reflected in the contents of the buffer after the call has
returned. The return value is the integer returned by the ioctl system
call.
If the argument is a mutable buffer and the mutable_flag argument is not
passed or is false, the behavior is as if a string had been passed. This
behavior will change in future releases of Python.
If the argument is an immutable buffer (most likely a string) then a copy
of the buffer is passed to the operating system and the return value is a
string of the same length containing whatever the operating system put in
the buffer. The length of the arg buffer in this case is not allowed to
exceed 1024 bytes.
If the arg given is an integer or if none is specified, the result value is
an integer corresponding to the return value of the ioctl call in the C
code."""
# removed the largish docstring because it is not in sync with the
# documentation any more (even in CPython's docstring is out of date)
# XXX this function's interface is a mess.
# We try to emulate the behavior of Python >= 2.5 w.r.t. mutate_flag
IOCTL_BUFSZ = 1024 # like cpython
fd = space.c_filedescriptor_w(w_fd)
op = space.bigint_w(w_request).uintmask() # CPython uses PyLong_AsUnsignedLongMask
op = rffi.cast(rffi.UINT, op)
try:
rwbuffer = space.writebuf_w(w_arg)
except OperationError as e:
if not (e.match(space, space.w_TypeError) or
e.match(space, space.w_BufferError)):
raise
else:
arg = rwbuffer.as_str()
ll_arg = rffi.str2charp(arg)
to_alloc = max(IOCTL_BUFSZ, len(arg))
try:
with rffi.scoped_alloc_buffer(to_alloc) as buf:
rffi.c_memcpy(rffi.cast(rffi.VOIDP, buf.raw),
rffi.cast(rffi.CONST_VOIDP, ll_arg), len(arg))
> rv = ioctl_str(fd, op, buf.raw)
module/fcntl/interp_fcntl.py:270:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (13, 1074033783L, <* <C object Array of Char {'nolength': True} at 0x7fd96acf2e10>>)
real_args = (13L, 1074033783L, <* <C object Array of Char {'nolength': True} at 0x7fd96acf2e10>>)
to_free = (), i = 2
def wrapper(*args):
assert len(args) == nb_args
real_args = ()
# XXX 'to_free' leaks if an allocation fails with MemoryError
# and was not the first in this function
to_free = ()
for i, TARGET in unrolling_arg_tps:
arg = args[i]
if TARGET == CCHARP or TARGET is VOIDP:
if arg is None:
from rpython.rtyper.annlowlevel import llstr
arg = lltype.nullptr(CCHARP.TO) # None => (char*)NULL
to_free = to_free + (arg, llstr(None), '\x04')
elif isinstance(arg, str):
tup = get_nonmovingbuffer_ll_final_null(arg)
to_free = to_free + tup
arg = tup[0]
elif isinstance(arg, unicode):
_oops()
elif TARGET == CWCHARP:
if arg is None:
arg = lltype.nullptr(CWCHARP.TO) # None => (wchar_t*)NULL
to_free = to_free + (arg,)
elif isinstance(arg, unicode):
arg = unicode2wcharp(arg)
to_free = to_free + (arg,)
elif _isfunctype(TARGET) and not _isllptr(arg):
# XXX pass additional arguments
use_gil = invoke_around_handlers
arg = llhelper(TARGET, _make_wrapper_for(TARGET, arg,
callbackholder,
use_gil))
else:
SOURCE = lltype.typeOf(arg)
if SOURCE != TARGET:
if TARGET is lltype.Float:
arg = float(arg)
elif ((isinstance(SOURCE, lltype.Number)
or SOURCE is lltype.Bool)
and (isinstance(TARGET, lltype.Number)
or TARGET is lltype.Bool)):
arg = cast(TARGET, arg)
real_args = real_args + (arg,)
> res = call_external_function(*real_args)
../rpython/rtyper/lltypesystem/rffi.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a0 = 13L, a1 = 1074033783L
a2 = <* <C object Array of Char {'nolength': True} at 0x7fd96acf2e10>>
def call_external_function(a0, a1, a2):
rgil.release()
# NB. it is essential that no exception checking occurs here!
if 1:
from rpython.rlib import rposix
rposix._errno_before(1)
if we_are_translated():
res = funcptr(a0, a1, a2)
else:
try: # only when non-translated
> res = funcptr(a0, a1, a2)
<2211-codegen /Users/matti/build-worker-x86_64/own-macos-x86-64/build/rpython/rtyper/lltypesystem/rffi.py:217>:13:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <* fn ioctl>
args = (13L, 1074033783L, <* <C object Array of Char {'nolength': True} at 0x7fd96acf2e10>>)
rffi = <module 'rpython.rtyper.lltypesystem.rffi' from '/Users/matti/build-worker-x86_64/own-macos-x86-64/build/rpython/rtyper/lltypesystem/rffi.pyc'>
i = 2, a = <* <C object Array of Char {'nolength': True} at 0x7fd96acf2e10>>
def __call__(self, *args):
from rpython.rtyper.lltypesystem import rffi
if isinstance(self._T, FuncType):
if len(args) != len(self._T.ARGS):
raise TypeError("calling %r with wrong argument number: %r" %
(self._T, args))
for i, a, ARG in zip(range(len(self._T.ARGS)), args, self._T.ARGS):
if typeOf(a) != ARG:
# ARG could be Void
if ARG == Void:
try:
value = getattr(self._obj, '_void' + str(i))
except AttributeError:
pass
else:
assert a == value
# None is acceptable for any pointer
elif isinstance(ARG, Ptr) and a is None:
pass
# Any pointer is convertible to void*
elif ARG is rffi.VOIDP and isinstance(typeOf(a), Ptr):
pass
# special case: ARG can be a container type, in which
# case a should be a pointer to it. This must also be
# special-cased in the backends.
elif (isinstance(ARG, ContainerType) and
typeOf(a) == Ptr(ARG)):
pass
else:
args_repr = [typeOf(arg) for arg in args]
raise TypeError("calling %r with wrong argument "
"types: %r" % (self._T, args_repr))
callb = self._obj._callable
if callb is None:
raise RuntimeError("calling undefined function")
> return callb(*args)
../rpython/rtyper/lltypesystem/lltype.py:1384:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rpython.rtyper.lltypesystem.ll2ctypes.LL2CtypesCallable object at 0x00007fd94181a250>
argvalues = (13L, 1074033783L, <* <C object Array of Char {'nolength': True} at 0x7fd96acf2e10>>)
cfunc = <ctypes._FuncPtr object at 0x00007fd960e31250>
def __call__(self, *argvalues):
with rlock:
if self.trampoline is None:
# lazily build the corresponding ctypes function object
cfunc = get_ctypes_callable(self.funcptr, self.calling_conv,
self.natural_arity)
self.trampoline = get_ctypes_trampoline(self.FUNCTYPE, cfunc, self.natural_arity)
# perform the call
> return self.trampoline(*argvalues)
../rpython/rtyper/lltypesystem/ll2ctypes.py:1342:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
argvalues = (13L, 1074033783L, <* <C object Array of Char {'nolength': True} at 0x7fd96acf2e10>>)
cargs = [13L, 1074033783L], i = 2
cvalue = <_ctypes.pointer.LP_ctypes_Array of Char {'nolength': True} *0 object at 0x00007fd960e31148>
def invoke_via_ctypes(*argvalues):
global _callback_exc_info
cargs = []
for i in range(len(argvalues)):
if i not in void_arguments:
cvalue = lltype2ctypes(argvalues[i])
if i in container_arguments:
cvalue = cvalue.contents
if natural_arity > 0 and i >= natural_arity:
> cvalue = cfunc.extraargs[i - natural_arity](cvalue)
../rpython/rtyper/lltypesystem/ll2ctypes.py:1370:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_ctypes.pointer.LP_ctypes_Array of Char {'nolength': True} *0 object at 0x00007fd960e314f0>
value = <_ctypes.pointer.LP_ctypes_Array of Char {'nolength': True} *0 object at 0x00007fd960e31148>
def __init__(self, value=None):
if not hasattr(self, '_buffer'):
self._buffer = ffiarray(1, autofree=True)
if value is not None:
> self.contents = value
../../../../oss/pypy-x86_64-buildbot/lib_pypy/_ctypes/pointer.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_ctypes.pointer.LP_ctypes_Array of Char {'nolength': True} *0 object at 0x00007fd960e314f0>
value = <_ctypes.pointer.LP_ctypes_Array of Char {'nolength': True} *0 object at 0x00007fd960e31148>
def setcontents(self, value):
if not isinstance(value, self._type_):
raise TypeError("expected %s instead of %s" % (
> self._type_.__name__, type(value).__name__))
E TypeError: expected ctypes_Array of Char {'nolength': True} *0 instead of LP_ctypes_Array of Char {'nolength': True} *0
../../../../oss/pypy-x86_64-buildbot/lib_pypy/_ctypes/pointer.py:106: TypeError
builder: own-macos-x86-64 build #1208
test: pypy/module/fcntl/test/test_fcntl/py/AppTestFcntl/()/test_ioctl