[Python-checkins] cpython (merge 3.4 -> default): Issue #22765: Fixed test_gdb failures. Supressed unexpected gdb output.
serhiy.storchaka
python-checkins at python.org
Sat Jan 31 10:51:07 CET 2015
https://hg.python.org/cpython/rev/3813a5282eac
changeset: 94411:3813a5282eac
parent: 94404:f726b27bda8d
parent: 94410:5b5a581d91c8
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sat Jan 31 11:50:22 2015 +0200
summary:
Issue #22765: Fixed test_gdb failures. Supressed unexpected gdb output.
Patch by Bohuslav Kabrda.
files:
Lib/test/test_gdb.py | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -123,6 +123,25 @@
# Generate a list of commands in gdb's language:
commands = ['set breakpoint pending yes',
'break %s' % breakpoint,
+
+ # GDB as of 7.4 (?) onwards can distinguish between the
+ # value of a variable at entry vs current value:
+ # http://sourceware.org/gdb/onlinedocs/gdb/Variables.html
+ # which leads to the selftests failing with errors like this:
+ # AssertionError: 'v at entry=()' != '()'
+ # Disable this:
+ 'set print entry-values no',
+
+ # The tests assume that the first frame of printed
+ # backtrace will not contain program counter,
+ # that is however not guaranteed by gdb
+ # therefore we need to use 'set print address off' to
+ # make sure the counter is not there. For example:
+ # #0 in PyObject_Print ...
+ # is assumed, but sometimes this can be e.g.
+ # #0 0x00003fffb7dd1798 in PyObject_Print ...
+ 'set print address off',
+
'run']
if cmds_after_breakpoint:
commands += cmds_after_breakpoint
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list