[Lldb-commits] [PATCH] D62788: [lldb-server unittest] Add missing teardown logic
António Afonso via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Jun 1 21:43:18 PDT 2019
aadsm created this revision.
aadsm added reviewers: clayborg, xiaobai, labath.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This test base class is missing the teardown making the second set of tests extending it to fail in an assertion in the FileSystem::Initialize() (as it's being initialized twice).
Not sure why this isn't failing the build bots.. (unless they're running without asserts?).
With this fix `ninja LLDBServerTests && ./tools/lldb/unittests/tools/lldb-server/tests/LLDBServerTests` successfully runs and passes all tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62788
Files:
lldb/unittests/tools/lldb-server/tests/TestBase.h
Index: lldb/unittests/tools/lldb-server/tests/TestBase.h
===================================================================
--- lldb/unittests/tools/lldb-server/tests/TestBase.h
+++ lldb/unittests/tools/lldb-server/tests/TestBase.h
@@ -25,6 +25,11 @@
lldb_private::HostInfo::Initialize();
}
+ static void TearDownTestCase() {
+ lldb_private::HostInfo::Terminate();
+ lldb_private::FileSystem::Terminate();
+ }
+
static std::string getInferiorPath(llvm::StringRef Name) {
llvm::SmallString<64> Path(LLDB_TEST_INFERIOR_PATH);
llvm::sys::path::append(Path, Name + LLDB_TEST_INFERIOR_SUFFIX);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62788.202581.patch
Type: text/x-patch
Size: 621 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190602/69be839f/attachment.bin>
More information about the lldb-commits
mailing list