[lldb/test] Add GdbRemoteTestCaseFactory to avoid duplication in lldb-server tests
authorPavel Labath <pavel@labath.sk>
Fri, 18 Dec 2020 20:26:25 +0000 (21:26 +0100)
committerPavel Labath <pavel@labath.sk>
Tue, 22 Dec 2020 09:07:47 +0000 (10:07 +0100)
This uses the same approach as the debug info tests to avoid needing to
explicitly spell out the two kinds of tests. I convert a handful of
tests to the new mechanism. The rest will be converted in follow-up
patches.

lldb/packages/Python/lldbsuite/test/decorators.py
lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py
lldb/test/API/tools/lldb-server/TestGdbRemoteKill.py
lldb/test/API/tools/lldb-server/TestGdbRemoteModuleInfo.py
lldb/test/API/tools/lldb-server/TestGdbRemoteProcessInfo.py
lldb/test/API/tools/lldb-server/TestGdbRemoteRegisterState.py
lldb/test/API/tools/lldb-server/TestGdbRemoteSingleStep.py
lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py

index a17cd6e..ff445fa 100644 (file)
@@ -373,13 +373,11 @@ def apple_simulator_test(platform):
 
 def debugserver_test(func):
     """Decorate the item as a debugserver test."""
-    func.debug_server = "debugserver"
     return add_test_categories(["debugserver"])(func)
 
 
 def llgs_test(func):
     """Decorate the item as a lldb-server test."""
-    func.debug_server = "llgs"
     return add_test_categories(["llgs"])(func)
 
 
index 0e3cde0..d928925 100644 (file)
@@ -27,6 +27,39 @@ class _ConnectionRefused(IOError):
     pass
 
 
+class GdbRemoteTestCaseFactory(type):
+
+    def __new__(cls, name, bases, attrs):
+        newattrs = {}
+        for attrname, attrvalue in attrs.items():
+            if not attrname.startswith("test"):
+                newattrs[attrname] = attrvalue
+                continue
+
+            # If any debug server categories were explicitly tagged, assume
+            # that list to be authoritative. If none were specified, try
+            # all of them.
+            all_categories = set(["debugserver", "llgs"])
+            categories = set(
+                getattr(attrvalue, "categories", [])) & all_categories
+            if not categories:
+                categories = all_categories
+
+            for cat in categories:
+                @decorators.add_test_categories([cat])
+                @wraps(attrvalue)
+                def test_method(self, attrvalue=attrvalue):
+                    return attrvalue(self)
+
+                method_name = attrname + "_" + cat
+                test_method.__name__ = method_name
+                test_method.debug_server = cat
+                newattrs[method_name] = test_method
+
+        return super(GdbRemoteTestCaseFactory, cls).__new__(
+                cls, name, bases, newattrs)
+
+@add_metaclass(GdbRemoteTestCaseFactory)
 class GdbRemoteTestCaseBase(Base):
 
     # Default time out in seconds. The timeout is increased tenfold under Asan.
index 96ebbfb..b42f843 100644 (file)
@@ -12,46 +12,23 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def inferior_exit_0(self):
-        self.prep_debug_monitor_and_inferior()
-        self.test_sequence.add_log_lines(
-            ["read packet: $vCont;c#a8",
-             "send packet: $W00#00"],
-            True)
-
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_inferior_exit_0_debugserver(self):
+    def _test_inferior_exit(self, retval):
         self.build()
-        self.inferior_exit_0()
-
-    @llgs_test
-    def test_inferior_exit_0_llgs(self):
-        self.build()
-        self.inferior_exit_0()
-
-    def inferior_exit_42(self):
-        RETVAL = 42
 
         procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=["retval:%d" % RETVAL])
+            inferior_args=["retval:%d" % retval])
 
         self.test_sequence.add_log_lines(
             ["read packet: $vCont;c#a8",
-             "send packet: $W{0:02x}#00".format(RETVAL)],
+             "send packet: $W{0:02x}#00".format(retval)],
             True)
 
         self.expect_gdbremote_sequence()
 
-    @debugserver_test
     @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_inferior_exit_42_debugserver(self):
-        self.build()
-        self.inferior_exit_42()
+    def test_inferior_exit_0(self):
+        self._test_inferior_exit(0)
 
-    @llgs_test
-    def test_inferior_exit_42_llgs(self):
-        self.build()
-        self.inferior_exit_42()
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_inferior_exit_42(self):
+        self._test_inferior_exit(42)
index 175ecfe..94dcf7b 100644 (file)
@@ -10,9 +10,11 @@ from lldbsuite.test import lldbutil
 class TestGdbRemoteKill(gdbremote_testcase.GdbRemoteTestCaseBase):
 
     mydir = TestBase.compute_mydir(__file__)
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
 
-    def attach_commandline_kill_after_initial_stop(self):
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_attach_commandline_kill_after_initial_stop(self):
+        self.build()
+        self.set_inferior_startup_attach()
         reg_expr = r"^\$[XW][0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"
         procs = self.prep_debug_monitor_and_inferior()
         self.test_sequence.add_log_lines([
@@ -43,15 +45,3 @@ class TestGdbRemoteKill(gdbremote_testcase.GdbRemoteTestCaseBase):
         self.assertFalse(
             lldbgdbserverutils.process_is_running(
                 procs["inferior"].pid, False))
-
-    @debugserver_test
-    def test_attach_commandline_kill_after_initial_stop_debugserver(self):
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_kill_after_initial_stop()
-
-    @llgs_test
-    def test_attach_commandline_kill_after_initial_stop_llgs(self):
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_kill_after_initial_stop()
index 8365b65..bab097c 100644 (file)
@@ -12,7 +12,10 @@ class TestGdbRemoteModuleInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def module_info(self):
+    @add_test_categories(["llgs"])
+    def test_module_info(self):
+        self.build()
+        self.set_inferior_startup_launch()
         procs = self.prep_debug_monitor_and_inferior()
         self.add_process_info_collection_packets()
         context = self.expect_gdbremote_sequence()
@@ -34,9 +37,3 @@ class TestGdbRemoteModuleInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
         self.assertRegexpMatches(spec, '"file_size":\d+')
         self.assertRegexpMatches(spec, '"triple":"\w*-\w*-.*"')
         self.assertRegexpMatches(spec, '"uuid":"[A-Fa-f0-9]+"')
-
-    @llgs_test
-    def test_module_info(self):
-        self.build()
-        self.set_inferior_startup_launch()
-        self.module_info()
index a470867..5d8c5e0 100644 (file)
@@ -1,6 +1,3 @@
-
-
-
 import gdbremote_testcase
 import lldbgdbserverutils
 from lldbsuite.test.decorators import *
@@ -12,7 +9,9 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def qProcessInfo_returns_running_process(self):
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_qProcessInfo_returns_running_process(self):
+        self.build()
         procs = self.prep_debug_monitor_and_inferior()
         self.add_process_info_collection_packets()
 
@@ -33,18 +32,10 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
         # If possible, verify that the process is running.
         self.assertTrue(lldbgdbserverutils.process_is_running(pid, True))
 
-    @debugserver_test
     @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qProcessInfo_returns_running_process_debugserver(self):
-        self.build()
-        self.qProcessInfo_returns_running_process()
-
-    @llgs_test
-    def test_qProcessInfo_returns_running_process_llgs(self):
+    def test_attach_commandline_qProcessInfo_reports_correct_pid(self):
         self.build()
-        self.qProcessInfo_returns_running_process()
-
-    def attach_commandline_qProcessInfo_reports_correct_pid(self):
+        self.set_inferior_startup_attach()
         procs = self.prep_debug_monitor_and_inferior()
         self.assertIsNotNone(procs)
         self.add_process_info_collection_packets()
@@ -63,21 +54,9 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
         reported_pid = int(pid_text, base=16)
         self.assertEqual(reported_pid, procs["inferior"].pid)
 
-    @debugserver_test
     @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_attach_commandline_qProcessInfo_reports_correct_pid_debugserver(
-            self):
+    def test_qProcessInfo_reports_valid_endian(self):
         self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_qProcessInfo_reports_correct_pid()
-
-    @llgs_test
-    def test_attach_commandline_qProcessInfo_reports_correct_pid_llgs(self):
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_qProcessInfo_reports_correct_pid()
-
-    def qProcessInfo_reports_valid_endian(self):
         procs = self.prep_debug_monitor_and_inferior()
         self.add_process_info_collection_packets()
 
@@ -92,18 +71,7 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
         # Ensure the process id looks reasonable.
         endian = process_info.get("endian")
         self.assertIsNotNone(endian)
-        self.assertTrue(endian in ["little", "big", "pdp"])
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qProcessInfo_reports_valid_endian_debugserver(self):
-        self.build()
-        self.qProcessInfo_reports_valid_endian()
-
-    @llgs_test
-    def test_qProcessInfo_reports_valid_endian_llgs(self):
-        self.build()
-        self.qProcessInfo_reports_valid_endian()
+        self.assertIn(endian, ["little", "big", "pdp"])
 
     def qProcessInfo_contains_keys(self, expected_key_set):
         procs = self.prep_debug_monitor_and_inferior()
@@ -152,45 +120,27 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
             set(),
             "the listed keys were present but unexpected in qProcessInfo result")
 
-    @skipUnlessDarwin
-    @debugserver_test
+    @add_test_categories(["debugserver"])
     @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qProcessInfo_contains_cputype_cpusubtype_debugserver_darwin(self):
-        self.build()
-        self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
-
-    @skipUnlessDarwin
-    @llgs_test
-    def test_qProcessInfo_contains_cputype_cpusubtype_llgs_darwin(self):
+    def test_qProcessInfo_contains_cputype_cpusubtype(self):
         self.build()
         self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
 
-    @llgs_test
-    def test_qProcessInfo_contains_triple_ppid_llgs(self):
+    @add_test_categories(["llgs"])
+    def test_qProcessInfo_contains_triple_ppid(self):
         self.build()
         self.qProcessInfo_contains_keys(set(['triple', 'parent-pid']))
 
-    @skipUnlessDarwin
-    @debugserver_test
+    @add_test_categories(["debugserver"])
     @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self):
-        self.build()
-        # We don't expect to see triple on darwin.  If we do, we'll prefer triple
-        # to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup
-        # for the remote Host and Process.
-        self.qProcessInfo_does_not_contain_keys(set(['triple']))
-
-    @skipUnlessDarwin
-    @llgs_test
-    def test_qProcessInfo_does_not_contain_triple_llgs_darwin(self):
+    def test_qProcessInfo_does_not_contain_triple(self):
         self.build()
         # We don't expect to see triple on darwin.  If we do, we'll prefer triple
         # to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup
         # for the remote Host and Process.
         self.qProcessInfo_does_not_contain_keys(set(['triple']))
 
-    @skipIfDarwin
-    @llgs_test
-    def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs(self):
+    @add_test_categories(["llgs"])
+    def test_qProcessInfo_does_not_contain_cputype_cpusubtype(self):
         self.build()
         self.qProcessInfo_does_not_contain_keys(set(['cputype', 'cpusubtype']))
index 3d07e19..849f5c9 100644 (file)
@@ -9,7 +9,6 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
     def grp_register_save_restore_works(self, with_suffix):
         # Start up the process, use thread suffix, grab main thread id.
         inferior_args = ["message:main entered", "sleep:5"]
@@ -92,29 +91,15 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase):
         self.assertIsNotNone(final_reg_values)
         self.assertEqual(final_reg_values, initial_reg_values)
 
-    @debugserver_test
-    def test_grp_register_save_restore_works_with_suffix_debugserver(self):
-        USE_THREAD_SUFFIX = True
-        self.build()
-        self.set_inferior_startup_launch()
-        self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
-
-    @llgs_test
-    def test_grp_register_save_restore_works_with_suffix_llgs(self):
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_grp_register_save_restore_works_with_suffix(self):
         USE_THREAD_SUFFIX = True
         self.build()
         self.set_inferior_startup_launch()
         self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
 
-    @debugserver_test
-    def test_grp_register_save_restore_works_no_suffix_debugserver(self):
-        USE_THREAD_SUFFIX = False
-        self.build()
-        self.set_inferior_startup_launch()
-        self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
-
-    @llgs_test
-    def test_grp_register_save_restore_works_no_suffix_llgs(self):
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_grp_register_save_restore_works_no_suffix(self):
         USE_THREAD_SUFFIX = False
         self.build()
         self.set_inferior_startup_launch()
index fba8bec..09f729c 100644 (file)
@@ -1,5 +1,3 @@
-
-
 import gdbremote_testcase
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -10,18 +8,10 @@ class TestGdbRemoteSingleStep(gdbremote_testcase.GdbRemoteTestCaseBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_single_step_only_steps_one_instruction_with_s_debugserver(self):
-        self.build()
-        self.set_inferior_startup_launch()
-        self.single_step_only_steps_one_instruction(
-            use_Hc_packet=True, step_instruction="s")
-
     @skipIfWindows # No pty support to test any inferior std -i/e/o
-    @llgs_test
     @skipIf(triple='^mips')
-    def test_single_step_only_steps_one_instruction_with_s_llgs(self):
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_single_step_only_steps_one_instruction_with_s(self):
         self.build()
         self.set_inferior_startup_launch()
         self.single_step_only_steps_one_instruction(
index c83b4fb..95e4236 100644 (file)
@@ -1,4 +1,3 @@
-
 import json
 import re
 
@@ -166,7 +165,11 @@ class TestGdbRemoteThreadsInStopReply(
 
         return thread_pcs
 
-    def QListThreadsInStopReply_supported(self):
+
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_QListThreadsInStopReply_supported(self):
+        self.build()
+        self.set_inferior_startup_launch()
         procs = self.prep_debug_monitor_and_inferior()
         self.test_sequence.add_log_lines(
             self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, True)
@@ -174,69 +177,42 @@ class TestGdbRemoteThreadsInStopReply(
         context = self.expect_gdbremote_sequence()
         self.assertIsNotNone(context)
 
+    # In current implementation of llgs on Windows, as a response to '\x03' packet, the debugger
+    # of the native process will trigger a call to DebugBreakProcess that will create a new thread
+    # to handle the exception debug event. So one more stop thread will be notified to the
+    # delegate, e.g. llgs.  So tests below to assert the stop threads number will all fail.
+    @expectedFailureAll(oslist=["windows"])
+    @skipIfNetBSD
     @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_QListThreadsInStopReply_supported_debugserver(self):
+    def test_stop_reply_reports_multiple_threads(self):
         self.build()
         self.set_inferior_startup_launch()
-        self.QListThreadsInStopReply_supported()
-
-    @llgs_test
-    def test_QListThreadsInStopReply_supported_llgs(self):
-        self.build()
-        self.set_inferior_startup_launch()
-        self.QListThreadsInStopReply_supported()
-
-    def stop_reply_reports_multiple_threads(self, thread_count):
         # Gather threads from stop notification when QThreadsInStopReply is
         # enabled.
         stop_reply_threads = self.gather_stop_reply_threads(
-            self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count)
-        self.assertEqual(len(stop_reply_threads), thread_count)
+            self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, 5)
+        self.assertEqual(len(stop_reply_threads), 5)
 
     @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_stop_reply_reports_multiple_threads_debugserver(self):
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_reports_multiple_threads(5)
-
-    # In current implementation of llgs on Windows, as a response to '\x03' packet, the debugger
-    # of the native process will trigger a call to DebugBreakProcess that will create a new thread
-    # to handle the exception debug event. So one more stop thread will be notified to the
-    # delegate, e.g. llgs.  So tests below to assert the stop threads number will all fail.
     @expectedFailureAll(oslist=["windows"])
     @skipIfNetBSD
-    @llgs_test
-    def test_stop_reply_reports_multiple_threads_llgs(self):
+    def test_no_QListThreadsInStopReply_supplies_no_threads(self):
         self.build()
         self.set_inferior_startup_launch()
-        self.stop_reply_reports_multiple_threads(5)
-
-    def no_QListThreadsInStopReply_supplies_no_threads(self, thread_count):
         # Gather threads from stop notification when QThreadsInStopReply is not
         # enabled.
-        stop_reply_threads = self.gather_stop_reply_threads(None, thread_count)
+        stop_reply_threads = self.gather_stop_reply_threads(None, 5)
         self.assertEqual(len(stop_reply_threads), 0)
 
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_no_QListThreadsInStopReply_supplies_no_threads_debugserver(self):
-        self.build()
-        self.set_inferior_startup_launch()
-        self.no_QListThreadsInStopReply_supplies_no_threads(5)
-
     @expectedFailureAll(oslist=["windows"])
     @skipIfNetBSD
-    @llgs_test
-    def test_no_QListThreadsInStopReply_supplies_no_threads_llgs(self):
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_stop_reply_reports_correct_threads(self):
         self.build()
         self.set_inferior_startup_launch()
-        self.no_QListThreadsInStopReply_supplies_no_threads(5)
-
-    def stop_reply_reports_correct_threads(self, thread_count):
         # Gather threads from stop notification when QThreadsInStopReply is
         # enabled.
+        thread_count = 5
         stop_reply_threads = self.gather_stop_reply_threads(
             self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count)
         self.assertEqual(len(stop_reply_threads), thread_count)
@@ -254,24 +230,15 @@ class TestGdbRemoteThreadsInStopReply(
 
         # Ensure each thread in q{f,s}ThreadInfo appears in stop reply threads
         for tid in threads:
-            self.assertTrue(tid in stop_reply_threads)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_stop_reply_reports_correct_threads_debugserver(self):
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_reports_correct_threads(5)
+            self.assertIn(tid, stop_reply_threads)
 
     @expectedFailureAll(oslist=["windows"])
     @skipIfNetBSD
-    @llgs_test
-    def test_stop_reply_reports_correct_threads_llgs(self):
+    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
+    def test_stop_reply_contains_thread_pcs(self):
         self.build()
         self.set_inferior_startup_launch()
-        self.stop_reply_reports_correct_threads(5)
-
-    def stop_reply_contains_thread_pcs(self, thread_count):
+        thread_count = 5
         results = self.gather_stop_reply_pcs(
                 self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count)
         stop_reply_pcs = results["thread_pcs"]
@@ -284,21 +251,6 @@ class TestGdbRemoteThreadsInStopReply(
 
         self.assertEqual(len(threads_info_pcs), thread_count)
         for thread_id in stop_reply_pcs:
-            self.assertTrue(thread_id in threads_info_pcs)
-            self.assertTrue(int(stop_reply_pcs[thread_id], 16)
-                    == int(threads_info_pcs[thread_id], 16))
-
-    @expectedFailureAll(oslist=["windows"])
-    @skipIfNetBSD
-    @llgs_test
-    def test_stop_reply_contains_thread_pcs_llgs(self):
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_contains_thread_pcs(5)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_stop_reply_contains_thread_pcs_debugserver(self):
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_contains_thread_pcs(5)
+            self.assertIn(thread_id, threads_info_pcs)
+            self.assertEqual(int(stop_reply_pcs[thread_id], 16),
+                    int(threads_info_pcs[thread_id], 16))