* Thu Apr 12 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-2
- fix test_gdb (patch 153)
This commit is contained in:
David Malcolm 2012-04-12 11:18:08 -04:00
parent 28856627bf
commit 3170c05485
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,35 @@
--- 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

View File

@ -122,7 +122,7 @@
Summary: Version 3 of the Python programming language aka Python 3000
Name: python3
Version: %{pybasever}.3
Release: 1%{?dist}
Release: 2%{?dist}
License: Python
Group: Development/Languages
@ -377,6 +377,10 @@ Patch150: 00150-disable-rAssertAlmostEqual-cmath-on-ppc.patch
# path to Python/bltinmodule.c:
Patch152: 00152-fix-test-gdb-regex.patch
# Strip out lines of the form "warning: Unable to open ..." from gdb's stderr
# when running test_gdb.py; also cope with change to gdb in F17 onwards in
# which values are printed as "v@entry" rather than just "v":
Patch153: 00153-fix-test_gdb-noise.patch
# (New patches go here ^^^)
#
@ -595,6 +599,7 @@ done
%endif
# 00151: not for python3
%patch152 -p0
%patch153 -p0
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
# are many differences between 2.6 and the Python 3 library.
@ -1417,6 +1422,9 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Thu Apr 12 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-2
- fix test_gdb (patch 153)
* Wed Apr 11 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-1
- 3.2.3; refresh patch 102 (lib64); drop upstream patches 148 (gdbm magic
values), 149 (__pycache__ fix); add patch 152 (test_gdb regex)