summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-04-30 22:15:44 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-04-30 22:15:44 (GMT)
commit81641d6ebc0a184e10e2770587f37ad853cd134b (patch)
treef970cf1a7e632e9d620d9227b5a62625cc2fac34
parentaa54e2ff5e46a875e6f7dfe5295575d2b6dc3e93 (diff)
downloadcpython-81641d6ebc0a184e10e2770587f37ad853cd134b.zip
cpython-81641d6ebc0a184e10e2770587f37ad853cd134b.tar.gz
cpython-81641d6ebc0a184e10e2770587f37ad853cd134b.tar.bz2
Issue #17712: Fix test_gdb failures on Ubuntu 13.04.
-rw-r--r--Lib/test/test_gdb.py45
-rw-r--r--Misc/NEWS2
2 files changed, 26 insertions, 21 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index 9713dc9..abcb23e 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -145,29 +145,32 @@ class DebuggerTests(unittest.TestCase):
# Use "args" to invoke gdb, capturing stdout, stderr:
out, err = run_gdb(*args, PYTHONHASHSEED='0')
- # Ignore some noise on stderr due to the pending breakpoint:
- err = err.replace('Function "%s" not defined.\n' % breakpoint, '')
- # Ignore some other noise on stderr (http://bugs.python.org/issue8600)
- err = err.replace("warning: Unable to find libthread_db matching"
- " inferior's thread library, thread debugging will"
- " not be available.\n",
- '')
- err = err.replace("warning: Cannot initialize thread debugging"
- " library: Debugger service failed\n",
- '')
- err = err.replace('warning: Could not load shared library symbols for '
- 'linux-vdso.so.1.\n'
- 'Do you need "set solib-search-path" or '
- '"set sysroot"?\n',
- '')
- err = err.replace('warning: Could not load shared library symbols for '
- 'linux-gate.so.1.\n'
- 'Do you need "set solib-search-path" or '
- '"set sysroot"?\n',
- '')
+ errlines = err.splitlines()
+ unexpected_errlines = []
+
+ # Ignore some benign messages on stderr.
+ ignore_patterns = (
+ 'Function "%s" not defined.' % breakpoint,
+ "warning: no loadable sections found in added symbol-file"
+ " system-supplied DSO",
+ "warning: Unable to find libthread_db matching"
+ " inferior's thread library, thread debugging will"
+ " not be available.",
+ "warning: Cannot initialize thread debugging"
+ " library: Debugger service failed",
+ 'warning: Could not load shared library symbols for '
+ 'linux-vdso.so',
+ 'warning: Could not load shared library symbols for '
+ 'linux-gate.so',
+ 'Do you need "set solib-search-path" or '
+ '"set sysroot"?',
+ )
+ for line in errlines:
+ if not line.startswith(ignore_patterns):
+ unexpected_errlines.append(line)
# Ensure no unexpected error messages:
- self.assertEqual(err, '')
+ self.assertEqual(unexpected_errlines, [])
return out
def get_gdb_repr(self, source,
diff --git a/Misc/NEWS b/Misc/NEWS
index d8475b6..10f00a4 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -147,6 +147,8 @@ IDLE
Tests
-----
+- Issue #17712: Fix test_gdb failures on Ubuntu 13.04.
+
- Issue #17835: Fix test_io when the default OS pipe buffer size is larger
than one million bytes.