This is an archive of the discontinued LLVM Phabricator instance.

[lldb-vscode] Make tests not wait for 'launch' process events if launch fails.
ClosedPublic

Authored by jgorbe on May 12 2023, 11:44 AM.

Details

Summary

After https://reviews.llvm.org/D147831, lldb-vscode doesn't send a
process event after launch/attach in case of failure. I believe this is
the right interpretation of the spec, because the description of the
event says:

The event indicates that the debugger has begun debugging a new
process.

and we haven't started debugging a process if there's no process because
we failed to launch it. This is also supported by the fact that
request_launch in vscode.py doesn't wait for the event if passed
expectFailure=True. However, this doesn't take into account
*unexpected* launch failures. In that case, request_launch will hang
indefinitely waiting for the process event.

This patch changes it so we'll only wait for these events if
request["success"] is true, independently of whether any failure was
expected or not.

Diff Detail

Event Timeline

jgorbe created this revision.May 12 2023, 11:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2023, 11:44 AM

LGTM. With this patch, if I re-enable the restart tests on ARM I get a failure after a few seconds, instead of timing out.

wallace accepted this revision.May 22 2023, 10:38 AM

makes sense

This revision is now accepted and ready to land.May 22 2023, 10:38 AM