python2/00153-fix-test_gdb-noise.patch
David Malcolm b0a6ae18b3 2.7.3-1
* Wed Apr 11 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-1
- 2.7.3: refresh patch 102 (lib64); drop upstream patches 11 (ascii-to-lower),
115 (pydoc robustness), 145 (linux2), 148 (gdbm magic values), 151 (deadlock
in fork); refresh patch 112 (debug build); revise patch 127
(test_structmember); fix test_gdb (patch 153); refresh patch 137 (distutils
tests); add python2.pc to python-devel; regenerate the autotool intermediates
patch (patch 300)
2012-04-13 10:36:12 -04:00

36 lines
1.7 KiB
Diff

--- Lib/test/test_gdb.py.old 2012-04-11 21:04:01.367073855 -0400
+++ Lib/test/test_gdb.py 2012-04-12 08:52:58.320288761 -0400
@@ -96,6 +96,15 @@ class DebuggerTests(unittest.TestCase):
# Generate a list of commands in gdb's language:
commands = ['set breakpoint pending yes',
'break %s' % breakpoint,
+
+ # GDB as of Fedora 17 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',
+
'run']
if cmds_after_breakpoint:
commands += cmds_after_breakpoint
@@ -135,8 +144,16 @@ class DebuggerTests(unittest.TestCase):
err = err.replace("warning: Cannot initialize thread debugging"
" library: Debugger service failed\n",
'')
+ err = '\n'.join([line
+ for line in err.splitlines()
+ if not line.startswith('warning: Unable to open')
+ if not line.startswith('Missing separate debuginfo for')
+ if not line.startswith('Try: yum --disablerepo=')
+ # In case 'set print entry-values no' failed:
+ if not line.startswith('Undefined set print command')])
# Ensure no unexpected error messages:
+ self.maxDiff = None
self.assertEqual(err, '')
return out