[Lldb-commits] [lldb] 7f4d66f - [lldb] Delete TestStopReplyContainsThreadPcs
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 18 05:17:39 PST 2022
Author: Pavel Labath
Date: 2022-01-18T14:17:33+01:00
New Revision: 7f4d66f23e3e8a2a03e83a2df0ee3a56790e2b64
URL: https://github.com/llvm/llvm-project/commit/7f4d66f23e3e8a2a03e83a2df0ee3a56790e2b64
DIFF: https://github.com/llvm/llvm-project/commit/7f4d66f23e3e8a2a03e83a2df0ee3a56790e2b64.diff
LOG: [lldb] Delete TestStopReplyContainsThreadPcs
This was meant to be a replacement for the lldb-server sub-test suite of
the API tests, but it never got off the ground and it's making the
windows bot flaky.
Deleting it does not reduce test coverage as the original api test is
still around.
Added:
Modified:
lldb/unittests/tools/lldb-server/tests/CMakeLists.txt
Removed:
lldb/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp
################################################################################
diff --git a/lldb/unittests/tools/lldb-server/tests/CMakeLists.txt b/lldb/unittests/tools/lldb-server/tests/CMakeLists.txt
index ed5eb88ba5270..cb9e138fbe61b 100644
--- a/lldb/unittests/tools/lldb-server/tests/CMakeLists.txt
+++ b/lldb/unittests/tools/lldb-server/tests/CMakeLists.txt
@@ -3,7 +3,6 @@ add_lldb_unittest(LLDBServerTests
MessageObjects.cpp
TestBase.cpp
TestClient.cpp
- ThreadIdsInJstopinfoTest.cpp
LINK_LIBS
lldbHost
diff --git a/lldb/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp b/lldb/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp
deleted file mode 100644
index 2306b434a6df0..0000000000000
--- a/lldb/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//===-- ThreadsInJstopinfoTest.cpp ----------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "TestBase.h"
-#include "TestClient.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "llvm/Support/FormatVariadic.h"
-#include "llvm/Support/Path.h"
-#include "llvm/Testing/Support/Error.h"
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include <string>
-
-using namespace llgs_tests;
-using namespace lldb_private;
-using namespace llvm;
-using namespace lldb;
-using namespace testing;
-
-#ifdef __NetBSD__
-#define SKIP_ON_NETBSD(x) DISABLED_ ## x
-#else
-#define SKIP_ON_NETBSD(x) x
-#endif
-
-TEST_F(StandardStartupTest, SKIP_ON_NETBSD(TestStopReplyContainsThreadPcs)) {
- // This inferior spawns 4 threads, then forces a break.
- ASSERT_THAT_ERROR(
- Client->SetInferior({getInferiorPath("thread_inferior"), "4"}),
- Succeeded());
-
- ASSERT_THAT_ERROR(Client->ListThreadsInStopReply(), Succeeded());
- ASSERT_THAT_ERROR(Client->ContinueAll(), Succeeded());
- unsigned int pc_reg = Client->GetPcRegisterId();
- ASSERT_NE(pc_reg, UINT_MAX);
-
- auto jthreads_info = Client->GetJThreadsInfo();
- ASSERT_THAT_EXPECTED(jthreads_info, Succeeded());
-
- auto stop_reply = Client->GetLatestStopReplyAs<StopReplyStop>();
- ASSERT_THAT_EXPECTED(stop_reply, Succeeded());
- auto stop_reply_pcs = stop_reply->getThreadPcs();
- auto thread_infos = jthreads_info->GetThreadInfos();
- ASSERT_EQ(stop_reply_pcs.size(), thread_infos.size())
- << "Thread count mismatch.";
-
- for (auto stop_reply_pc : stop_reply_pcs) {
- unsigned long tid = stop_reply_pc.first;
- ASSERT_TRUE(thread_infos.find(tid) != thread_infos.end())
- << "Thread ID: " << tid << " not in JThreadsInfo.";
- EXPECT_THAT(thread_infos[tid].ReadRegister(pc_reg),
- Pointee(Eq(stop_reply_pc.second)));
- }
-}
More information about the lldb-commits
mailing list