Author: Pavel Labath Date: 2020-12-22T10:07:47+01:00 New Revision: 0a8a2453fb843cf2e0f43e389b58d516525f0b8c
URL: https://github.com/llvm/llvm-project/commit/0a8a2453fb843cf2e0f43e389b58d516525f0b8c DIFF: https://github.com/llvm/llvm-project/commit/0a8a2453fb843cf2e0f43e389b58d516525f0b8c.diff LOG: [lldb/test] Add GdbRemoteTestCaseFactory to avoid duplication in lldb-server tests 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. Added: Modified: 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 Removed: ################################################################################ diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index a17cd6ea33ab..ff445fa0b926 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -373,13 +373,11 @@ def should_skip_simulator_test(): 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) diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py index 0e3cde01520a..d9289251d89d 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -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. diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py index 96ebbfb09bdc..b42f8431c51e 100644 --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py @@ -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) diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteKill.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteKill.py index 175ecfed538b..94dcf7b6e171 100644 --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteKill.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteKill.py @@ -10,9 +10,11 @@ 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 @@ def attach_commandline_kill_after_initial_stop(self): 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() diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteModuleInfo.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteModuleInfo.py index 8365b657f932..bab097c31365 100644 --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteModuleInfo.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteModuleInfo.py @@ -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 @@ def module_info(self): 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() diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteProcessInfo.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteProcessInfo.py index a4708679e0d8..5d8c5e0840c5 100644 --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteProcessInfo.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteProcessInfo.py @@ -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 @@ def qProcessInfo_returns_running_process(self): # 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 @@ def attach_commandline_qProcessInfo_reports_correct_pid(self): 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 @@ def qProcessInfo_reports_valid_endian(self): # 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 @@ def qProcessInfo_does_not_contain_keys(self, absent_key_set): 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'])) diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteRegisterState.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteRegisterState.py index 3d07e19d2d38..849f5c96244d 100644 --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteRegisterState.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteRegisterState.py @@ -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 @@ def grp_register_save_restore_works(self, with_suffix): 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() diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteSingleStep.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteSingleStep.py index fba8bec8ee6b..09f729ca0dac 100644 --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteSingleStep.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteSingleStep.py @@ -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( diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py index c83b4fbdd37d..95e423678147 100644 --- a/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py @@ -1,4 +1,3 @@ - import json import re @@ -166,7 +165,11 @@ def gather_threads_info_pcs(self, pc_register, little_endian): 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 @@ def QListThreadsInStopReply_supported(self): 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 @@ def stop_reply_reports_correct_threads(self, thread_count): # 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 @@ def stop_reply_contains_thread_pcs(self, thread_count): 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)) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits