summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/debugger
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-04-12 08:02:28 +0000
committerPavel Labath <pavel@labath.sk>2019-04-12 08:02:28 +0000
commit539b7e65b450f899a1550e8333e817028a3f093f (patch)
tree7002fa44c9e215c4a46d7441466f9e5709ee48d9 /lldb/packages/Python/lldbsuite/test/python_api/debugger
parent4b0931bc177b9114c6ca9ea5e2929392ee1990a0 (diff)
downloadbcm5719-llvm-539b7e65b450f899a1550e8333e817028a3f093f.tar.gz
bcm5719-llvm-539b7e65b450f899a1550e8333e817028a3f093f.zip
Make TestPrintStackTraces deterministic
This test contained an incredibly complicated inferior, but in reality, all it was testing was that we can backtrace up to main and see main's arguments. However, the way this was implemented (setting a breakpoint on a separate thread) meant that each time the test would run, it would stop in a different location on the main thread. Most of the time this location would be deep in some libc function, which meant that the success of this test depended on our ability to backtrace out of a random function of the c library that the user happens to have installed. This makes the test unpredictable. Backtracing out of a libc function is an important functionality, but this is not the way to test it. Often it is not even our fault that we cannot backtrace out because the C library contains a lot of assembly routines that may not have correct unwind info associated with them. For this reason the test has accumulated numerous @expectedFail/Flaky decorators. In this patch, I replace the inferior with one that does not depend on libc functions. Instead I create a couple of stack frames of user code, and have the test verify that. I also simplify the test by using lldbutil.run_to_source_breakpoint. llvm-svn: 358266
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/debugger')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud