splhack created this revision. Herald added a subscriber: 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 in PseudoTerminal::OpenSecondary, and FileSystem::Instance() is failing with assertion on arm Linux. The assertion should be FileSystem re-initialization check, therefore the hypothesis is that TerminalTest tests are initializing FileSystem instance repeatedly. Use SubsystemRAII<FileSystem> to ensure tearing down the FileSystem instance. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D153091 Files: lldb/unittests/Host/posix/TerminalTest.cpp Index: lldb/unittests/Host/posix/TerminalTest.cpp =================================================================== --- lldb/unittests/Host/posix/TerminalTest.cpp +++ lldb/unittests/Host/posix/TerminalTest.cpp @@ -6,9 +6,11 @@ // //===----------------------------------------------------------------------===// +#include "lldb/Host/FileSystem.h" #include "lldb/Host/PseudoTerminal.h" #include "lldb/Host/Terminal.h" #include "llvm/Testing/Support/Error.h" +#include "TestingSupport/SubsystemRAII.h" #include "gmock/gmock.h" #include "gtest/gtest.h" @@ -20,6 +22,7 @@ class TerminalTest : public ::testing::Test { protected: + SubsystemRAII<FileSystem> subsystems; PseudoTerminal m_pty; int m_fd; Terminal m_term;
Index: lldb/unittests/Host/posix/TerminalTest.cpp =================================================================== --- lldb/unittests/Host/posix/TerminalTest.cpp +++ lldb/unittests/Host/posix/TerminalTest.cpp @@ -6,9 +6,11 @@ // //===----------------------------------------------------------------------===// +#include "lldb/Host/FileSystem.h" #include "lldb/Host/PseudoTerminal.h" #include "lldb/Host/Terminal.h" #include "llvm/Testing/Support/Error.h" +#include "TestingSupport/SubsystemRAII.h" #include "gmock/gmock.h" #include "gtest/gtest.h" @@ -20,6 +22,7 @@ class TerminalTest : public ::testing::Test { protected: + SubsystemRAII<FileSystem> subsystems; PseudoTerminal m_pty; int m_fd; Terminal m_term;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits