Skip to content

cygdb tests are failing #1717

Description

@lindsayad

From Travis Job #3088.1:

$ if $PYTHON_DBG -V >&2; then CFLAGS="-O0 -ggdb" $PYTHON_DBG runtests.py -vv Debugger --backends=$BACKEND; fi
Python 2.7.3
Python 2.7.3 (default, Oct 26 2016, 20:35:50) 
[GCC 4.6.3]
Running tests against Cython 0.25.2 ae37c69b8d3ade8376588b253e93fb68a929193b
Backends: ctest_all (Cython.Debugger.Tests.TestLibCython.TestAll) ... 
******************************   v INSIDE GDB v   ******************************
gdb command file: Activating virtualenv: /home/travis/virtualenv/python2.7.9; path_to_activate_this_py: /home/travis/virtualenv/python2.7.9/bin/activate_this.py
Breakpoint 3 at 0x7ffff63d2f4b: file codefile.c, line 1019.
Breakpoint 15 at 0x519e24: file ../Python/ceval.c, line 688.
Breakpoint 16 (__pyx_pw_8codefile_5outer_1inner) pending.
37        def inner():
Value returned: None
44    outer()()
Breakpoint 27 at 0x7ffff63d39e9: file codefile.c, line 1314.
35    def outer():
Value returned: <cython_function_or_method at remote 0x9b7e70>
44    outer()()
2409        result = PyDict_GetItem(__pyx_d, name);
1117      __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_int_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
    Tell cygdb whether to colorize source code.
    
    Tell cygdb whether to colorize source code.
    
Breakpoint 47 at 0x7ffff63d2f4b: file codefile.c, line 1019.
2409        result = PyDict_GetItem(__pyx_d, name);
******************************   v STDERR v   ******************************
Install pygments for colorized source code.
EF...Function "__pyx_pw_8codefile_5outer_1inner" not defined.
Python Exception <type 'exceptions.KeyError'> (u'a',): 
EEE...Python Exception <class 'gdb.error'> Cannot convert value to int.: 
EPython Exception <class 'gdb.error'> Cannot convert value to int.: 
EE.EEE.E.FFF
======================================================================
ERROR: test_cyset (Cython.Debugger.Tests.test_libcython_in_gdb.CySet)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 389, in test_cyset
    gdb.execute('cy set a = $cy_eval("{None: []}")')
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1915, in execute
    _execute(command, from_tty)
error: Selected frame does not correspond with a Cython function we know about.
======================================================================
ERROR: test_inner (Cython.Debugger.Tests.test_libcython_in_gdb.TestClosure)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 422, in test_inner
    self.assertEqual(str(self.read_var('a')), "'an object'")
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 74, in read_var
    result = gdb.parse_and_eval('$cy_cvalue("%s")' % varname)
error: Error occurred in Python convenience function: (u'a',)
======================================================================
ERROR: test_outer (Cython.Debugger.Tests.test_libcython_in_gdb.TestClosure)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 432, in test_outer
    self.assertEqual('', gdb.execute('cy locals', to_string=True))
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1912, in execute
    _execute(command, from_tty)
error: Error occurred in Python command: Cannot convert value to int.
======================================================================
ERROR: test_cy_eval (Cython.Debugger.Tests.test_libcython_in_gdb.TestCyEval)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 402, in test_cy_eval
    result = gdb.execute('print $cy_eval("None")', to_string=True)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1912, in execute
    _execute(command, from_tty)
error: Error occurred in Python convenience function: Cannot convert value to int.
======================================================================
ERROR: test_cython_exec (Cython.Debugger.Tests.test_libcython_in_gdb.TestExec)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 363, in test_cython_exec
    self.assertEqual("[0]", self.eval_command('[a]'))
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 356, in eval_command
    (self.tmpfilename, command))
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1915, in execute
    _execute(command, from_tty)
error: Error occurred in Python command: Cannot convert value to int.
======================================================================
ERROR: test_python_exec (Cython.Debugger.Tests.test_libcython_in_gdb.TestExec)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 380, in test_python_exec
    gdb.execute('cy exec some_random_var = 14')
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1915, in execute
    _execute(command, from_tty)
error: Error occurred in Python command: Cannot convert value to int.
======================================================================
ERROR: test_functions (Cython.Debugger.Tests.test_libcython_in_gdb.TestFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 308, in test_functions
    result = gdb.execute('print $cy_cname("b")', to_string=True)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1912, in execute
    _execute(command, from_tty)
error: Selected frame does not correspond with a Cython function we know about.
======================================================================
ERROR: test_globals (Cython.Debugger.Tests.test_libcython_in_gdb.TestLocalsGlobals)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 274, in test_globals
    result = gdb.execute('cy globals', to_string=True)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1912, in execute
    _execute(command, from_tty)
error: Not a function cygdb knows about. Use the normal GDB commands instead.
======================================================================
ERROR: test_locals (Cython.Debugger.Tests.test_libcython_in_gdb.TestLocalsGlobals)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 266, in test_locals
    result = gdb.execute('cy locals', to_string=True)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1912, in execute
    _execute(command, from_tty)
error: Not a function cygdb knows about. Use the normal GDB commands instead.
======================================================================
ERROR: test_cython_next (Cython.Debugger.Tests.test_libcython_in_gdb.TestNext)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 258, in test_cython_next
    self.lineno_equals(line)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 87, in lineno_equals
    self.assertEqual(libcython.cython_info.lineno(frame), lineno)
  File "/home/travis/build/cython/cython/Cython/Debugger/libcython.py", line 908, in lineno
    return super(CythonInfo, self).lineno(frame)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2254, in lineno
    return self.pyframe(frame).current_line_num()
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2249, in pyframe
    raise gdb.RuntimeError(
AttributeError: 'module' object has no attribute 'RuntimeError'
======================================================================
ERROR: test_print (Cython.Debugger.Tests.test_libcython_in_gdb.TestPrint)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 323, in test_print
    result = gdb.execute('cy print b', to_string=True)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 1912, in execute
    _execute(command, from_tty)
error: Error occurred in Python command: No symbol "b" in current context.
======================================================================
FAIL: test_backtrace (Cython.Debugger.Tests.test_libcython_in_gdb.TestBacktrace)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 295, in test_backtrace
    match_backtrace_output(result)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 291, in match_backtrace_output
    result), result
AssertionError: #7  0x0000000000519e03 in <module>() at <string>:1
#18 0x00007ffff63d4d57 in codefile() at /tmp/tmp_YX6w7/codefile.pyx:46
        46    spam()#22 0x00007ffff63d2f37 in spam() at /tmp/tmp_YX6w7/codefile.pyx:12
        12    def spam(a=0):
======================================================================
FAIL: test_cython_step (Cython.Debugger.Tests.test_libcython_in_gdb.TestStep)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 211, in test_cython_step
    self.lineno_equals('b = c = d = 0')
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 87, in lineno_equals
    self.assertEqual(libcython.cython_info.lineno(frame), lineno)
AssertionError: 60 != 16
======================================================================
FAIL: test_python_step (Cython.Debugger.Tests.test_libcython_in_gdb.TestStep)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 234, in test_python_step
    self.assertEqual(curframe.name(), 'PyEval_EvalFrameEx')
AssertionError: u'__Pyx_GetModuleGlobalName' != 'PyEval_EvalFrameEx'
======================================================================
FAIL: test_updown (Cython.Debugger.Tests.test_libcython_in_gdb.TestUpDown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 336, in test_updown
    assert 'os.path.join("foo", "bar")' in result
AssertionError
----------------------------------------------------------------------
Ran 24 tests in 3.194s
FAILED (failures=4, errors=11)
EEEEE
======================================================================
ERROR: test_bytestring (Cython.Debugger.Tests.test_libpython_in_gdb.TestPrettyPrinters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 76, in test_bytestring
    bytestring = self.alloc_bytestring("spam")
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 63, in alloc_bytestring
    return self.pyobject_fromcode(code, gdbvar=gdbvar)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 48, in pyobject_fromcode
    return libpython.PyObjectPtr.from_pyobject_ptr(self.get_pyobject(code))
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 39, in get_pyobject
    assert libpython.pointervalue(value) != 0
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2350, in pointervalue
    pointer = _pointervalue(gdbval)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2346, in _pointervalue
    return int(gdbval)
error: Cannot convert value to int.
======================================================================
ERROR: test_frame_type (Cython.Debugger.Tests.test_libpython_in_gdb.TestPrettyPrinters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 113, in test_frame_type
    frame = self.pyobject_fromcode('PyEval_GetFrame()')
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 48, in pyobject_fromcode
    return libpython.PyObjectPtr.from_pyobject_ptr(self.get_pyobject(code))
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 39, in get_pyobject
    assert libpython.pointervalue(value) != 0
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2350, in pointervalue
    pointer = _pointervalue(gdbval)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2346, in _pointervalue
    return int(gdbval)
error: Cannot convert value to int.
======================================================================
ERROR: test_int (Cython.Debugger.Tests.test_libpython_in_gdb.TestPrettyPrinters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 100, in test_int
    intval = self.pyobject_fromcode('PyInt_FromLong(100)')
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 48, in pyobject_fromcode
    return libpython.PyObjectPtr.from_pyobject_ptr(self.get_pyobject(code))
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 39, in get_pyobject
    assert libpython.pointervalue(value) != 0
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2350, in pointervalue
    pointer = _pointervalue(gdbval)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2346, in _pointervalue
    return int(gdbval)
error: Cannot convert value to int.
======================================================================
ERROR: test_long (Cython.Debugger.Tests.test_libpython_in_gdb.TestPrettyPrinters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 106, in test_long
    gdbvar='longval')
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 48, in pyobject_fromcode
    return libpython.PyObjectPtr.from_pyobject_ptr(self.get_pyobject(code))
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 39, in get_pyobject
    assert libpython.pointervalue(value) != 0
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2350, in pointervalue
    pointer = _pointervalue(gdbval)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2346, in _pointervalue
    return int(gdbval)
error: Cannot convert value to int.
======================================================================
ERROR: test_unicode (Cython.Debugger.Tests.test_libpython_in_gdb.TestPrettyPrinters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 89, in test_unicode
    unicode_string = self.alloc_unicodestring(u"spam ἄλφα")
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 66, in alloc_unicodestring
    self.alloc_bytestring(string.encode('UTF-8'), gdbvar='_temp')
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 63, in alloc_bytestring
    return self.pyobject_fromcode(code, gdbvar=gdbvar)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 48, in pyobject_fromcode
    return libpython.PyObjectPtr.from_pyobject_ptr(self.get_pyobject(code))
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/home/travis/build/cython/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py", line 39, in get_pyobject
    assert libpython.pointervalue(value) != 0
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2350, in pointervalue
    pointer = _pointervalue(gdbval)
  File "/home/travis/build/cython/cython/Cython/Debugger/libpython.py", line 2346, in _pointervalue
    return int(gdbval)
error: Cannot convert value to int.
----------------------------------------------------------------------
Ran 5 tests in 0.473s
FAILED (errors=5)
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
******************************   ^ INSIDE GDB ^   ******************************ok
----------------------------------------------------------------------
Ran 1 test in 4.530s
OK
ALL DONE
[282919 refs]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions