summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-01-31 09:50:22 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-01-31 09:50:22 (GMT)
commit57f7db312210fcdc5db00f8e6a67f682ced342e3 (patch)
tree63f824f7c1c654066cf216185b62c2d0055611f0
parent9edd753229011bef100a3d4156adffbbe712fc0b (diff)
parentfdc995336f3884117f2ede573694b9f0f7b9c11c (diff)
downloadcpython-57f7db312210fcdc5db00f8e6a67f682ced342e3.zip
cpython-57f7db312210fcdc5db00f8e6a67f682ced342e3.tar.gz
cpython-57f7db312210fcdc5db00f8e6a67f682ced342e3.tar.bz2
Issue #22765: Fixed test_gdb failures. Supressed unexpected gdb output.
Patch by Bohuslav Kabrda.
-rw-r--r--Lib/test/test_gdb.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index 4fba3c3..2db9cd5 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -123,6 +123,25 @@ class DebuggerTests(unittest.TestCase):
# 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@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