Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/module/termios/test/test_termios.py::TestTermios::()::test_winsize

self = <test_termios.TestTermios object at 0x00007f83eaed4838>

    def test_winsize(self):
        source = py.code.Source("""
            import termios
            termios.tcsetwinsize(2, (50, 200))
            size = termios.tcgetwinsize(2)
            assert size == (50, 200)
            print('ok!')
            """)
        f = udir.join("test_ioctl_termios.py")
        f.write(source)
        child = self.spawn(['--withmod-termios', '--withmod-fcntl', str(f)])
>       child.expect('ok!')

module/termios/test/test_termios.py:148: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../virt_test/site-packages/pexpect/spawnbase.py:355: in expect
    timeout, searchwindowsize, async_)
../virt_test/site-packages/pexpect/spawnbase.py:383: in expect_list
    return exp.expect_loop(timeout)
../virt_test/site-packages/pexpect/expect.py:179: in expect_loop
    return self.eof(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0x00007f83eaed4790>
err = EOF('End Of File (EOF). Empty string style platform.',)

    def eof(self, err=None):
        spawn = self.spawn
    
        spawn.before = spawn._before.getvalue()
        spawn._buffer = spawn.buffer_type()
        spawn._before = spawn.buffer_type()
        spawn.after = EOF
        index = self.searcher.eof_index
        if index >= 0:
            spawn.match = EOF
            spawn.match_index = index
            return index
        else:
            spawn.match = None
            spawn.match_index = None
            msg = str(spawn)
            msg += '\nsearcher: %s' % self.searcher
            if err is not None:
                msg = str(err) + '\n' + msg
    
            exc = EOF(msg)
            exc.__cause__ = None # in Python 3.x we can use "raise exc from None"
>           raise exc
E           EOF: End Of File (EOF). Empty string style platform.
E           <pexpect.pty_spawn.spawn object at 0x00007f83eaed4410>
E           command: /Users/matti/build-worker-x86_64/own-macos-x86-64/build/virt_test/bin/python
E           args: ['/Users/matti/build-worker-x86_64/own-macos-x86-64/build/virt_test/bin/python', '/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/bin/pyinteractive.py', '-S', '--withmod-termios', '--withmod-fcntl', '/tmp/buildbot-x86_64/usession-py3.11-3730/test_ioctl_termios.py']
E           buffer (last 100 chars): ''
E           before (last 100 chars): "erand type for long(): 'LP_ctypes_Struct winsize { c_ws_row, c_ws_col, c_ws_xpixel, c_ws_ypixel }'\r\n"
E           after: <class 'pexpect.exceptions.EOF'>
E           match: None
E           match_index: None
E           exitstatus: None
E           flag_eof: True
E           pid: 97136
E           child_fd: 21
E           closed: False
E           timeout: 600
E           delimiter: <class 'pexpect.exceptions.EOF'>
E           logfile: <_pytest.capture.EncodedFile object at 0x00007f83f983b050>
E           logfile_read: None
E           logfile_send: None
E           maxread: 5000
E           ignorecase: False
E           searchwindowsize: None
E           delaybeforesend: 0.05
E           delayafterclose: 0.1
E           delayafterterminate: 0.1
E           searcher: searcher_re:
E               0: re.compile('ok!')

../virt_test/site-packages/pexpect/expect.py:122: EOF
---------- Captured stdout call ----------
SPAWN: ('/Users/matti/build-worker-x86_64/own-macos-x86-64/build/virt_test/bin/python', ['/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/bin/pyinteractive.py', '-S', '--withmod-termios', '--withmod-fcntl', '/tmp/buildbot-x86_64/usession-py3.11-3730/test_ioctl_termios.py']) {}
Traceback (most recent call last):
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/bin/pyinteractive.py", line 218, in <module>
    sys.exit(main_(sys.argv))
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/bin/pyinteractive.py", line 189, in main_
    verbose=interactiveconfig.verbose):
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/main.py", line 108, in run_toplevel
    f()
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/bin/pyinteractive.py", line 173, in doit
    main.run_file(filename, space=space)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/main.py", line 74, in run_file
    run_string(istring, filename, space)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/main.py", line 62, in run_string
    _run_eval_string(source, filename, space, False)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/main.py", line 50, in _run_eval_string
    retval = pycode.exec_code(space, w_globals, w_globals)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/eval.py", line 33, in exec_code
    return frame.run()
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/pyframe.py", line 256, in run
    return self.execute_frame()
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/pyframe.py", line 353, in execute_frame
    raise self._convert_unexpected_exception(e)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/pyframe.py", line 844, in _convert_unexpected_exception
    operr = error.get_converted_unexpected_exception(self.space, e)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/pyframe.py", line 349, in execute_frame
    executioncontext)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/pyopcode.py", line 67, in dispatch
    next_instr = self.handle_bytecode(co_code, next_instr, ec)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/pyopcode.py", line 73, in handle_bytecode
    next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/pyopcode.py", line 296, in dispatch_bytecode
    self.CALL_METHOD(oparg, next_instr)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/objspace/std/callmethod.py", line 93, in CALL_METHOD
    w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args+2)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/baseobjspace.py", line 1261, in call_valuestack
    nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/function.py", line 168, in funccall_valuestack
    return code.fastcall_2(self.space, self, f_1, f_0)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/gateway.py", line 1006, in fastcall_2
    self.handle_exception(space, e)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/gateway.py", line 908, in handle_exception
    raise error.get_converted_unexpected_exception(space, e)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/interpreter/gateway.py", line 1001, in fastcall_2
    w_result = self.fastfunc_2(space, w1, w2)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/module/termios/interp_termios.py", line 120, in tcsetwinsize
    failed = rposix.c_ioctl_voidp(fd, rposix.TIOCGWINSZ, winsize)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/rpython/rtyper/lltypesystem/rffi.py", line 321, in wrapper
    res = call_external_function(*real_args)
  File "<59-codegen /Users/matti/build-worker-x86_64/own-macos-x86-64/build/rpython/rtyper/lltypesystem/rffi.py:217>", line 13, in call_external_function
    res = funcptr(a0, a1, a2)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/rpython/rtyper/lltypesystem/lltype.py", line 1384, in __call__
    return callb(*args)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/rpython/rtyper/lltypesystem/ll2ctypes.py", line 1342, in __call__
    return self.trampoline(*argvalues)
  File "/Users/matti/build-worker-x86_64/own-macos-x86-64/build/rpython/rtyper/lltypesystem/ll2ctypes.py", line 1370, in invoke_via_ctypes
    cvalue = cfunc.extraargs[i - natural_arity](cvalue)
  File "/Users/matti/oss/pypy-x86_64-buildbot/lib_pypy/_ctypes/primitive.py", line 424, in __init__
    self.value = value
  File "/Users/matti/oss/pypy-x86_64-buildbot/lib_pypy/_ctypes/primitive.py", line 253, in _setvalue
    self._buffer[0] = value
TypeError: unsupported operand type for long(): 'LP_ctypes_Struct winsize { c_ws_row, c_ws_col, c_ws_xpixel, c_ws_ypixel }'
builder: own-macos-x86-64 build #1206
test: pypy/module/termios/test/test_termios/py/TestTermios/()/test_winsize