cpython/Lib/test/test_gdb
Hugo van Kemenade a80d95a04b
[3.11] gh-159914: Ignore gdb stderr in test_gdb.test_pretty_print (GH-159916) (GH-160201) (#160651)
gh-159914: Ignore gdb stderr in test_gdb.test_pretty_print (GH-159916)

test_strings() gets gdb.host_charset(), but fails if gdb writes
anything to stderr. For example, it fails if gdb logs the warning:

    "/usr/bin/gdb: warning: Couldn't determine a path for the index
    cache directory."

Even if stdout contains the expected encoding ("UTF-8").

Change test_gdb to only fail if stdout is empty, ignore stderr
otherwise to ignore gdb warnings.
(cherry picked from commit 88d922ad98)
(cherry picked from commit d9b6c229f2)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-10-25 11:09:38 -07:00
..
__init__.py
gdb_sample.py
test_backtrace.py
test_cfunction.py
test_cfunction_full.py
test_misc.py
test_pretty_print.py [3.11] gh-159914: Ignore gdb stderr in test_gdb.test_pretty_print (GH-159916) (GH-160201) (#160651) 2026-10-25 11:09:38 -07:00
util.py [3.11] gh-110995: Fix test_gdb check_usable_gdb() (GH-110998) (#111004) 2023-10-17 18:43:46 +00:00