splhack created this revision.
splhack added reviewers: clayborg, labath, bulbazord, yinghuitan, JDevlieghere, 
leonardchan.
Herald added subscribers: omjavaid, kristof.beyls.
Herald added a project: All.
splhack requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

D152712 <https://reviews.llvm.org/D152712> replaced 
`llvm::sys::RetryAfterSignal(-1, ::open)` with
`FileSystem::Instance().Open()` for bionic and `FileSystem::Instance()` is
failing with the re-initialization assertion on arm Linux test job.
This is because MainLoopTest does not tear down the FileSystem instance.

https://lab.llvm.org/buildbot/#/builders/96/builds/40781

Add FileSystem to SubsystemRAII<> to ensure destroying the FileSystem instance.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153102

Files:
  lldb/unittests/Host/MainLoopTest.cpp


Index: lldb/unittests/Host/MainLoopTest.cpp
===================================================================
--- lldb/unittests/Host/MainLoopTest.cpp
+++ lldb/unittests/Host/MainLoopTest.cpp
@@ -9,6 +9,7 @@
 #include "lldb/Host/MainLoop.h"
 #include "TestingSupport/SubsystemRAII.h"
 #include "lldb/Host/ConnectionFileDescriptor.h"
+#include "lldb/Host/FileSystem.h"
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Host/common/TCPSocket.h"
 #include "llvm/Testing/Support/Error.h"
@@ -20,7 +21,7 @@
 namespace {
 class MainLoopTest : public testing::Test {
 public:
-  SubsystemRAII<Socket> subsystems;
+  SubsystemRAII<FileSystem, Socket> subsystems;
 
   void SetUp() override {
     bool child_processes_inherit = false;


Index: lldb/unittests/Host/MainLoopTest.cpp
===================================================================
--- lldb/unittests/Host/MainLoopTest.cpp
+++ lldb/unittests/Host/MainLoopTest.cpp
@@ -9,6 +9,7 @@
 #include "lldb/Host/MainLoop.h"
 #include "TestingSupport/SubsystemRAII.h"
 #include "lldb/Host/ConnectionFileDescriptor.h"
+#include "lldb/Host/FileSystem.h"
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Host/common/TCPSocket.h"
 #include "llvm/Testing/Support/Error.h"
@@ -20,7 +21,7 @@
 namespace {
 class MainLoopTest : public testing::Test {
 public:
-  SubsystemRAII<Socket> subsystems;
+  SubsystemRAII<FileSystem, Socket> subsystems;
 
   void SetUp() override {
     bool child_processes_inherit = false;
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to