[all-commits] [llvm/llvm-project] aa16bf: [lldb-vscode] Fix a race in test_extra_launch_comm...

Pavel Labath via All-commits all-commits at lists.llvm.org
Mon Nov 25 01:07:56 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: aa16bf15fe38ae4d12d85e7610891dd48e6c0cda
      https://github.com/llvm/llvm-project/commit/aa16bf15fe38ae4d12d85e7610891dd48e6c0cda
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py

  Log Message:
  -----------
  [lldb-vscode] Fix a race in test_extra_launch_commands

Summary:
The test used a non-stopping "run" command to launch the process. This
is different from the regular launch with no extra launch commands,
which uses eLaunchFlagStopAtEntry to ensure that the process stops
straight away.

I'm not really sure what's supposed to happen in non-stop-at-entry mode,
or if that's even supported, but what ended up happening was the launch
packet got a reply while the process was running. Then the test case did
a continue_to_next_stop(), which queued a *second* resume request
(along with the internal "resumes" which were being issued as a part of
normal process startup). These two resumes ended up chasing each other's
tails inside lldb in a way which produced hilarious log traces.
Surprisingly, the test ended up passing most of the time, but it did
cause spurious failures when the test seemed to miss a breakpoint.

This changes the test to use stop-at-entry mode in the manual launch
sequence too, which seems to be enough to make the test pass reliably.

Reviewers: clayborg, kusmour, jankratochvil

Subscribers: lldb-commits

Tags: #lldb

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




More information about the All-commits mailing list