Skip to content

[3.11] gh-159914: Ignore gdb stderr in test_gdb.test_pretty_print (GH-159916) (GH-160201) - #160651

Open
hugovk wants to merge 1 commit into
python:3.11from
hugovk:backport-d9b6c22-3.11
Open

hugovk wants to merge 1 commit into
python:3.11from
hugovk:backport-d9b6c22-3.11

Conversation

@hugovk

@hugovk hugovk commented Oct 25, 2026

Copy link
Copy Markdown
Member

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 88d922a) (cherry picked from commit d9b6c22)

…nt (pythonGH-159916) (pythonGH-160201)

pythongh-159914: Ignore gdb stderr in test_gdb.test_pretty_print (pythonGH-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 88d922a)
(cherry picked from commit d9b6c22)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
@hugovk

hugovk commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

!buildbot Debian root

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @hugovk for commit 21b8c8b 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F160651%2Fmerge

The command will test the builders whose names match following regular expression: Debian root

The builders matched are:

  • AMD64 Debian root PR

@hugovk

hugovk commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

Similar to #160201 (comment), this fixes an "unreleasable" buildbot for 3.11:

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants