diff options
| author | Pavel Labath <labath@google.com> | 2015-09-02 09:12:28 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2015-09-02 09:12:28 +0000 |
| commit | 5dcb02501f99cfbd0b4c002cd7cbc6280d0cca78 (patch) | |
| tree | 4f1900f3179d07defd9bfc781a12962f4a814801 /lldb/source/Commands/CommandObjectSyntax.h | |
| parent | 1b9d6914d3cbe3a3cc26194e565c12e8eb729ec3 (diff) | |
| download | llvm-5dcb02501f99cfbd0b4c002cd7cbc6280d0cca78.zip llvm-5dcb02501f99cfbd0b4c002cd7cbc6280d0cca78.tar.gz llvm-5dcb02501f99cfbd0b4c002cd7cbc6280d0cca78.tar.bz2 | |
Address flakyness in TestAttachResume
Summary:
The test (among other things) attempts to verify that detaching works while the inferior is
running. However, this was racy since the inferior could end up stopping again before we got a
chance to detach from it (the test could be made to fail reliably by inserting a sleep just after
the last "continue" command). The reason for the stop was that we had a breakpoint set in a place
that can be hit by multiple threads, and we stop because another thread hit a breakpoint.
I fix this by moving the breakpoint to a place that is reachable from only one thread. I also
make sure that the same thread cannot hit the breakpoint if we are exceptionaly slow by flipping
a flag which makes the breakpoint unreachable (I cannot just disable or delete the breakpoint as
the test makes it a point to try detaching while breakpoints are still set).
Another source or racyness was that the test verified that the process resumes and
stops after a "continue". However, if these two events happened too fast, the initial start event
would be lost, and the test would end up confused. I have implemented this in a safer manner and
made a utility function out of it, as I know of a couple of other tests which need the same
functionality.
Reviewers: zturner, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12527
llvm-svn: 246623
Diffstat (limited to 'lldb/source/Commands/CommandObjectSyntax.h')
0 files changed, 0 insertions, 0 deletions
