|
|
f992f7 |
From 084421eb30e9ae981731aae4038cc934b3feb71d Mon Sep 17 00:00:00 2001
|
|
|
f992f7 |
From: Tomas Orsava <torsava@redhat.com>
|
|
|
f992f7 |
Date: Wed, 11 Jan 2017 15:14:09 +0100
|
|
|
f992f7 |
Subject: [PATCH] Don't run any of the stack navigation tests in test_gdb when
|
|
|
f992f7 |
Python is optimized,
|
|
|
f992f7 |
|
|
|
f992f7 |
since there appear to be many different ways in which gdb can
|
|
|
f992f7 |
fail to read the PyFrameObject* for arbitrary places in the callstack,
|
|
|
f992f7 |
presumably due to compiler optimization (rhbz#912025)
|
|
|
f992f7 |
---
|
|
|
f992f7 |
Lib/test/test_gdb.py | 13 +++----------
|
|
|
f992f7 |
1 file changed, 3 insertions(+), 10 deletions(-)
|
|
|
f992f7 |
|
|
|
f992f7 |
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
|
|
|
f992f7 |
index 38e570f..6d45da8 100644
|
|
|
f992f7 |
--- a/Lib/test/test_gdb.py
|
|
|
f992f7 |
+++ b/Lib/test/test_gdb.py
|
|
|
f992f7 |
@@ -697,10 +697,10 @@ class PyListTests(DebuggerTests):
|
|
|
23b3e9 |
' 3 def foo(a, b, c):\n',
|
|
|
23b3e9 |
bt)
|
|
|
23b3e9 |
|
|
|
23b3e9 |
+@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
|
|
|
23b3e9 |
+@unittest.skipIf(python_is_optimized(),
|
|
|
23b3e9 |
+ "Python was compiled with optimizations")
|
|
|
23b3e9 |
class StackNavigationTests(DebuggerTests):
|
|
|
23b3e9 |
- @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
|
|
|
23b3e9 |
- @unittest.skipIf(python_is_optimized(),
|
|
|
23b3e9 |
- "Python was compiled with optimizations")
|
|
|
23b3e9 |
def test_pyup_command(self):
|
|
|
23b3e9 |
'Verify that the "py-up" command works'
|
|
|
23b3e9 |
bt = self.get_stack_trace(script=self.get_sample_script(),
|
|
|
f992f7 |
@@ -711,7 +711,6 @@ class StackNavigationTests(DebuggerTests):
|
|
|
23b3e9 |
baz\(a, b, c\)
|
|
|
23b3e9 |
$''')
|
|
|
23b3e9 |
|
|
|
23b3e9 |
- @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
|
|
|
23b3e9 |
def test_down_at_bottom(self):
|
|
|
23b3e9 |
'Verify handling of "py-down" at the bottom of the stack'
|
|
|
23b3e9 |
bt = self.get_stack_trace(script=self.get_sample_script(),
|
|
|
f992f7 |
@@ -719,9 +718,6 @@ $''')
|
|
|
23b3e9 |
self.assertEndsWith(bt,
|
|
|
23b3e9 |
'Unable to find a newer python frame\n')
|
|
|
23b3e9 |
|
|
|
23b3e9 |
- @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
|
|
|
f992f7 |
- @unittest.skipIf(python_is_optimized(),
|
|
|
f992f7 |
- "Python was compiled with optimizations")
|
|
|
23b3e9 |
def test_up_at_top(self):
|
|
|
23b3e9 |
'Verify handling of "py-up" at the top of the stack'
|
|
|
23b3e9 |
bt = self.get_stack_trace(script=self.get_sample_script(),
|
|
|
f992f7 |
@@ -729,9 +725,6 @@ $''')
|
|
|
23b3e9 |
self.assertEndsWith(bt,
|
|
|
23b3e9 |
'Unable to find an older python frame\n')
|
|
|
23b3e9 |
|
|
|
23b3e9 |
- @unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
|
|
|
23b3e9 |
- @unittest.skipIf(python_is_optimized(),
|
|
|
23b3e9 |
- "Python was compiled with optimizations")
|
|
|
23b3e9 |
def test_up_then_down(self):
|
|
|
23b3e9 |
'Verify "py-up" followed by "py-down"'
|
|
|
23b3e9 |
bt = self.get_stack_trace(script=self.get_sample_script(),
|
|
|
f992f7 |
--
|
|
|
f992f7 |
2.11.0
|
|
|
f992f7 |
|