Skip to content

test_gdb: test_strings() fails if gdb logs a warning #159914

Closed

Description

@vstinner

test_gdb failed on AMD64 Debian root 3.x: https://buildbot.python.org/#/builders/345/builds/15735

ERROR: test_strings (test.test_gdb.test_pretty_print.PrettyPrintTests.test_strings)
Verify the pretty-printing of unicode strings
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_gdb/test_pretty_print.py", line 129, in test_strings
    raise RuntimeError(
    ...<2 lines>...
        f'stderr={stderr!r}')
RuntimeError: unable to determine the host charset of gdb
stdout='UTF-8\n'
stderr="/usr/bin/gdb: warning: Couldn't determine a path for the index cache directory.\n"

I propose to ignore stderr if stdout is non-empty. I'm working on a PR for that.

Linked PRs

Activity

  1. added a commit that references this issue on Oct 20, 2026
  2. added 3 commits that reference this issue on Oct 20, 2026
  3. encukou commented on Oct 21, 2026

    @encukou
    Member

    Thank you!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions