[all-commits] [llvm/llvm-project] 388548: [lldb][unittest] Add call_once flag to initialize ...
Chelsea Cassanova via All-commits
all-commits at lists.llvm.org
Tue Feb 6 08:17:35 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 388548359f5049b88a9738d8a9e67691503fbdef
https://github.com/llvm/llvm-project/commit/388548359f5049b88a9738d8a9e67691503fbdef
Author: Chelsea Cassanova <chelsea_cassanova at apple.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M lldb/unittests/TestingSupport/TestUtilities.cpp
M lldb/unittests/TestingSupport/TestUtilities.h
Log Message:
-----------
[lldb][unittest] Add call_once flag to initialize debugger (#80786)
I tried adding a new unit test to the core test
suite (https://github.com/llvm/llvm-project/pull/79533) but it broke the
test suite on AArch64 Linux due to hitting an assertion for calling
`Debugger::Initialize` more than once. When the unit test suite is
invoked as a standalone binary the test suite state is shared, and
`Debugger::Initialize` gets called in `DiagnosticEventTest.cpp` before
being called in `ProgressReportTest.cpp`.
`DiagnosticEventTest.cpp` uses a call_once flag to initialize the
debugger but it's local to that test. This commit adds a once_flag to
`TestUtilities` so that `Debugger::Initialize` can be called once by the
tests that use it.
More information about the All-commits
mailing list