teak-llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode
Pavel Labath e8687e6ee1 Make TestVSCode_step pass reliably
Summary:
The test was failing occasionally (1% of runs or so), because of
unpredictable timings between the two threads spawned by the test. If
the second thread hit the breakpoint right as we were stepping out of
the function on the first thread, we would still be stuck at the inner
frame when the process stopped.

This would cause errors like:
    File "/home/worker/lldb-x86_64-debian/lldb-x86_64-debian/llvm/tools/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py", line 67, in test_step
      self.assertEqual(x1, x3, 'verify step out variable')
  AssertionError: 2 != 1 : verify step out variable

AFAICT, lldb-vscode is doing the right thing here, and the problem is
that the test is not taking this sequence of events into account. Since
the test is about testing stepping, it does not seem necessary to have
threads in the inferior at all, so I just rewrite the test to execute
the code we're supposed to step through directly on the main thread.

Reviewers: clayborg, jgorbe

Subscribers: jfb, lldb-commits

Differential Revision: https://reviews.llvm.org/D60608

llvm-svn: 358847
2019-04-21 13:02:41 +00:00
..
attach Re-enable most lldb-vscode tests on Linux. 2019-04-03 20:43:20 +00:00
breakpoint Re-enable most lldb-vscode tests on Linux. 2019-04-03 20:43:20 +00:00
launch [lldb] [test] Mark three more tests flakey/xfail on NetBSD 2019-04-18 12:31:48 +00:00
stackTrace Skip tests on Darwin for now. The build bots are not passing due to heavy load and poor machines. 2018-08-18 00:33:15 +00:00
step Make TestVSCode_step pass reliably 2019-04-21 13:02:41 +00:00
variables Skip tests on Darwin for now. The build bots are not passing due to heavy load and poor machines. 2018-08-18 00:33:15 +00:00
.categories
lldbvscode_testcase.py
vscode.py [lldb-vscode] Add logic to handle EOF when reading from lldb-vscode stdout. 2019-04-01 20:37:22 +00:00