summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-02-06 06:36:14 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-02-06 06:36:14 (GMT)
commitdd8430fa64dc3382220cf4e819e4caf9f28e1514 (patch)
tree4a3710b8a89b79fcabbba2504511349803695bf0
parente0944c94e052711c62280e8737e57070e3f29e82 (diff)
downloadcpython-dd8430fa64dc3382220cf4e819e4caf9f28e1514.zip
cpython-dd8430fa64dc3382220cf4e819e4caf9f28e1514.tar.gz
cpython-dd8430fa64dc3382220cf4e819e4caf9f28e1514.tar.bz2
Issue #23881: Only use entry-values with gdb 7.4 in tests.
Fixes a regression in issue #22765. Patch by Vinson Lee.
-rw-r--r--Lib/test/test_gdb.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index 948e7ca..0da1c02 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -119,14 +119,6 @@ class DebuggerTests(unittest.TestCase):
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
@@ -138,6 +130,16 @@ class DebuggerTests(unittest.TestCase):
'set print address off',
'run']
+
+ # 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:
+ if (gdb_major_version, gdb_minor_version) >= (7, 4):
+ commands += ['set print entry-values no']
+
if cmds_after_breakpoint:
commands += cmds_after_breakpoint
else: