Message346211
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") |
|
Date |
User |
Action |
Args |
2019-06-21 13:45:56 | vstinner | set | recipients:
+ vstinner |
2019-06-21 13:45:56 | vstinner | set | messageid: <1561124756.23.0.387959706511.issue37362@roundup.psfhosted.org> |
2019-06-21 13:45:56 | vstinner | link | issue37362 messages |
2019-06-21 13:45:55 | vstinner | create | |
|