https://github.com/oontvoo created https://github.com/llvm/llvm-project/pull/129921
Unregister the fake manager at end of test (https://github.com/llvm/llvm-project/issues/129910) >From 38f07a83ff621ae4879e4b0cbc8bd361d0b12a93 Mon Sep 17 00:00:00 2001 From: Vy Nguyen <v...@google.com> Date: Wed, 5 Mar 2025 14:45:24 -0500 Subject: [PATCH] [LLDB]Fix test crash Unregister the fake manager at end of test (https://github.com/llvm/llvm-project/issues/129910) --- lldb/unittests/Core/TelemetryTest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lldb/unittests/Core/TelemetryTest.cpp b/lldb/unittests/Core/TelemetryTest.cpp index 0e9f329110872..5b762ae816362 100644 --- a/lldb/unittests/Core/TelemetryTest.cpp +++ b/lldb/unittests/Core/TelemetryTest.cpp @@ -11,6 +11,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" #include "llvm/Telemetry/Telemetry.h" +#include "TestingSupport/SubsystemRAII.h" #include "llvm/Testing/Support/Error.h" #include "gtest/gtest.h" #include <memory> @@ -77,8 +78,13 @@ class FakePlugin : public telemetry::TelemetryManager { using namespace lldb_private::telemetry; +class TelemetryTest : public testing::Test { + public: + SubsystemRAII<FakePlugin> subsystems; +}; + #if LLVM_ENABLE_TELEMETRY -#define TELEMETRY_TEST(suite, test) TEST(suite, test) +#define TELEMETRY_TEST(suite, test) TEST_F(suite, test) #else #define TELEMETRY_TEST(suite, test) TEST(DISABLED_##suite, test) #endif _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits