mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
Merge from 3.2 (Issue #15043: skip test_gdb if the custom hooks can't be loaded)
This commit is contained in:
commit
9aff2a7c41
2 changed files with 13 additions and 1 deletions
|
|
@ -36,6 +36,15 @@ gdbpy_version, _ = p.communicate()
|
||||||
if gdbpy_version == b'':
|
if gdbpy_version == b'':
|
||||||
raise unittest.SkipTest("gdb not built with embedded python support")
|
raise unittest.SkipTest("gdb not built with embedded python support")
|
||||||
|
|
||||||
|
# Verify that "gdb" can load our custom hooks
|
||||||
|
p = subprocess.Popen(["gdb", "--batch", cmd,
|
||||||
|
"--args", sys.executable],
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
__, gdbpy_errors = p.communicate()
|
||||||
|
if b"auto-loading has been declined" in gdbpy_errors:
|
||||||
|
msg = "gdb security settings prevent use of custom hooks: %s"
|
||||||
|
raise unittest.SkipTest(msg % gdbpy_errors)
|
||||||
|
|
||||||
def gdb_has_frame_select():
|
def gdb_has_frame_select():
|
||||||
# Does this build of gdb have gdb.Frame.select ?
|
# Does this build of gdb have gdb.Frame.select ?
|
||||||
cmd = "--eval-command=python print(dir(gdb.Frame))"
|
cmd = "--eval-command=python print(dir(gdb.Frame))"
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,10 @@ Documentation
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
- Issue #14963 (partial): Add test cases for exception handling behaviour
|
- Issue #15043: test_gdb is now skipped entirely if gdb security settings
|
||||||
|
block loading of the gdb hooks
|
||||||
|
|
||||||
|
- Issue #14963: Add test cases for exception handling behaviour
|
||||||
in contextlib.ExitStack (Initial patch by Alon Horev)
|
in contextlib.ExitStack (Initial patch by Alon Horev)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue