This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2019-06-21.13:45:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561124756.23.0.387959706511.issue37362@roundup.psfhosted.org>
In-reply-to
Content
Currently, test_gdb fails if gdb logs messages on stderr which are "unexpected". I don't understand the rationale for that: Python is not supposed to test gdb. It's only supposed to check that python-gdb.py commands work as expected: stderr should be ignored.

In the past, I was lazy and just added more and more patterns to ignore on stderr, but this approach doesn't work in the long term: gdb evolves frequently, and there are always new messages.

Attached PR modify test_gdb to ignore stderr, except of "PC not saved" pattern used to skip test_gdb on a special case: bpo-34007.

        # bpo34007: Sometimes some versions of the shared libraries that
        # are part of the traceback are compiled in optimised mode and the
        # Program Counter (PC) is not present, not allowing gdb to walk the
        # frames back. When this happens, the Python bindings of gdb raise
        # an exception, making the test impossible to succeed.
        if "PC not saved" in err:
            raise unittest.SkipTest("gdb cannot walk the frame object"
                                    " because the Program Counter is"
                                    " not present")
History
Date User Action Args
2019-06-21 13:45:56vstinnersetrecipients: + vstinner
2019-06-21 13:45:56vstinnersetmessageid: <1561124756.23.0.387959706511.issue37362@roundup.psfhosted.org>
2019-06-21 13:45:56vstinnerlinkissue37362 messages
2019-06-21 13:45:55vstinnercreate