2.7.3-21: don't run any stack navigation tests in test_gdb for optimized builds (rhbz#912025)

* Wed Feb 20 2013 David Malcolm <dmalcolm@redhat.com> - 2.7.3-21
- don't run any stack navigation tests in test_gdb for optimized builds
(patch 167; rhbz#912025)
This commit is contained in:
David Malcolm 2013-02-20 12:33:39 -05:00
parent 187fefb3fb
commit d63f6bd94f
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,43 @@
diff -up Python-2.7.3/Lib/test/test_gdb.py.disable-stack-navigation-tests-when-optimized-in-test_gdb Python-2.7.3/Lib/test/test_gdb.py
--- Python-2.7.3/Lib/test/test_gdb.py.disable-stack-navigation-tests-when-optimized-in-test_gdb 2013-02-20 12:27:05.669526425 -0500
+++ Python-2.7.3/Lib/test/test_gdb.py 2013-02-20 12:27:05.715526422 -0500
@@ -653,10 +653,10 @@ class PyListTests(DebuggerTests):
' 3 def foo(a, b, c):\n',
bt)
+@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
+@unittest.skipIf(python_is_optimized(),
+ "Python was compiled with optimizations")
class StackNavigationTests(DebuggerTests):
- @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
- @unittest.skipIf(python_is_optimized(),
- "Python was compiled with optimizations")
def test_pyup_command(self):
'Verify that the "py-up" command works'
bt = self.get_stack_trace(script=self.get_sample_script(),
@@ -667,7 +667,6 @@ class StackNavigationTests(DebuggerTests
baz\(a, b, c\)
$''')
- @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
def test_down_at_bottom(self):
'Verify handling of "py-down" at the bottom of the stack'
bt = self.get_stack_trace(script=self.get_sample_script(),
@@ -675,7 +674,6 @@ $''')
self.assertEndsWith(bt,
'Unable to find a newer python frame\n')
- @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
def test_up_at_top(self):
'Verify handling of "py-up" at the top of the stack'
bt = self.get_stack_trace(script=self.get_sample_script(),
@@ -683,9 +681,6 @@ $''')
self.assertEndsWith(bt,
'Unable to find an older python frame\n')
- @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
- @unittest.skipIf(python_is_optimized(),
- "Python was compiled with optimizations")
def test_up_then_down(self):
'Verify "py-up" followed by "py-down"'
bt = self.get_stack_trace(script=self.get_sample_script(),

View File

@ -106,7 +106,7 @@ Summary: An interpreted, interactive, object-oriented programming language
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.7.3
Release: 20%{?dist}
Release: 21%{?dist}
License: Python
Group: Development/Languages
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
@ -742,6 +742,15 @@ Patch165: 00165-crypt-module-salt-backport.patch
# Not yet sent upstream
Patch166: 00166-fix-fake-repr-in-gdb-hooks.patch
# 00167 #
# Don't run any of the stack navigation tests in test_gdb when Python is
# optimized, since there appear to be many different ways in which gdb can
# fail to read the PyFrameObject* for arbitrary places in the callstack,
# presumably due to compiler optimization (rhbz#912025)
#
# Not yet sent upstream
Patch167: 00167-disable-stack-navigation-tests-when-optimized-in-test_gdb.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora 17 onwards,
@ -1075,6 +1084,7 @@ done
%patch165 -p1
mv Modules/cryptmodule.c Modules/_cryptmodule.c
%patch166 -p1
%patch167 -p1
# This shouldn't be necesarry, but is right now (2.2a3)
@ -1905,6 +1915,10 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Wed Feb 20 2013 David Malcolm <dmalcolm@redhat.com> - 2.7.3-21
- don't run any stack navigation tests in test_gdb for optimized builds
(patch 167; rhbz#912025)
* Wed Feb 20 2013 David Malcolm <dmalcolm@redhat.com> - 2.7.3-20
- s/cryptmodule/_cryptmodule/ in package payload (rhbz#835021)