[lldb/test] Reduce boilerplate in lldb-server tests

Nearly all of our lldb-server tests have two flavours (lldb-server and
debugserver). Each of them is tagged with an appropriate decorator, and
each of them starts with a call to a matching "init" method. The init
calls are mandatory, and it's not possible to meaningfully combine them
with a different decorator.

This patch leverages the existing decorators to also tag the tests with
the appropriate debug server tag, similar to how we do with debug info
flavours. This allows us to make the "init" calls from inside the common
setUp method.
This commit is contained in:
Pavel Labath 2020-12-10 15:52:00 +01:00
parent 52e4084d9c
commit c15c296521
30 changed files with 14 additions and 180 deletions

View File

@ -373,11 +373,13 @@ 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)

View File

@ -80,6 +80,10 @@ class GdbRemoteTestCaseBase(Base):
return any(("gdb-remote" in channel)
for channel in lldbtest_config.channels)
def getDebugServer(self):
method = getattr(self, self.testMethodName)
return getattr(method, "debug_server", None)
def setUp(self):
super(GdbRemoteTestCaseBase, self).setUp()
@ -114,6 +118,12 @@ class GdbRemoteTestCaseBase(Base):
else:
self.stub_hostname = "localhost"
debug_server = self.getDebugServer()
if debug_server == "debugserver":
self._init_debugserver_test()
else:
self._init_llgs_test()
def tearDown(self):
self.logger.removeHandler(self._verbose_log_handler)
self._verbose_log_handler = None
@ -150,7 +160,7 @@ class GdbRemoteTestCaseBase(Base):
self.test_sequence = GdbRemoteTestSequence(self.logger)
def init_llgs_test(self):
def _init_llgs_test(self):
reverse_connect = True
if lldb.remote_platform:
# Reverse connections may be tricky due to firewalls/NATs.
@ -198,7 +208,7 @@ class GdbRemoteTestCaseBase(Base):
self.reverse_connect = reverse_connect
def init_debugserver_test(self):
def _init_debugserver_test(self):
self.debug_monitor_exe = get_debugserver_exe()
if not self.debug_monitor_exe:
self.skipTest("debugserver exe not found")

View File

@ -19,7 +19,6 @@ class TestAutoInstallMainExecutable(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureAll(hostoslist=["windows"], triple='.*-android')
def test_target_auto_install_main_executable(self):
self.build()
self.init_llgs_test()
# Manually install the modified binary.
working_dir = lldb.remote_platform.GetWorkingDirectory()

View File

@ -75,7 +75,6 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase):
self.assertIsNotNone(pid)
# Launch debug monitor attaching to the simulated process
self.init_debugserver_test()
server = self.connect_to_debug_monitor(attach_pid=pid)
# Setup packet sequences

View File

@ -53,14 +53,12 @@ class TestGdbRemoteAttach(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_attach_with_vAttach_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_attach_manually()
self.attach_with_vAttach()
@llgs_test
def test_attach_with_vAttach_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_attach_manually()
self.attach_with_vAttach()

View File

@ -104,7 +104,6 @@ class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipIfWindows # no auxv support.
@llgs_test
def test_supports_auxv_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.supports_auxv()
@ -120,7 +119,6 @@ class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_auxv_data_is_correct_size_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.auxv_data_is_correct_size()
@ -129,7 +127,6 @@ class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureNetBSD
@llgs_test
def test_auxv_data_is_correct_size_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.auxv_data_is_correct_size()
@ -160,7 +157,6 @@ class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_auxv_keys_look_valid_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.auxv_keys_look_valid()
@ -169,7 +165,6 @@ class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureNetBSD
@llgs_test
def test_auxv_keys_look_valid_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.auxv_keys_look_valid()
@ -209,7 +204,6 @@ class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_auxv_chunked_reads_work_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.auxv_chunked_reads_work()
@ -218,7 +212,6 @@ class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureNetBSD
@llgs_test
def test_auxv_chunked_reads_work_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.auxv_chunked_reads_work()

View File

@ -24,13 +24,11 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase):
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_inferior_exit_0_debugserver(self):
self.init_debugserver_test()
self.build()
self.inferior_exit_0()
@llgs_test
def test_inferior_exit_0_llgs(self):
self.init_llgs_test()
self.build()
self.inferior_exit_0()
@ -50,12 +48,10 @@ class TestGdbRemoteExitCode(GdbRemoteTestCaseBase):
@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.init_debugserver_test()
self.build()
self.inferior_exit_42()
@llgs_test
def test_inferior_exit_42_llgs(self):
self.init_llgs_test()
self.build()
self.inferior_exit_42()

View File

@ -86,14 +86,12 @@ class TestGdbRemoteExpeditedRegisters(
@debugserver_test
def test_stop_notification_contains_any_registers_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_any_registers()
@llgs_test
def test_stop_notification_contains_any_registers_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_any_registers()
@ -112,14 +110,12 @@ class TestGdbRemoteExpeditedRegisters(
@debugserver_test
def test_stop_notification_contains_no_duplicate_registers_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_no_duplicate_registers()
@llgs_test
def test_stop_notification_contains_no_duplicate_registers_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_no_duplicate_registers()
@ -129,14 +125,12 @@ class TestGdbRemoteExpeditedRegisters(
@debugserver_test
def test_stop_notification_contains_pc_register_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_pc_register()
@llgs_test
def test_stop_notification_contains_pc_register_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_pc_register()
@ -148,14 +142,12 @@ class TestGdbRemoteExpeditedRegisters(
@debugserver_test
def test_stop_notification_contains_fp_register_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_fp_register()
@llgs_test
def test_stop_notification_contains_fp_register_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_fp_register()
@ -165,14 +157,12 @@ class TestGdbRemoteExpeditedRegisters(
@debugserver_test
def test_stop_notification_contains_sp_register_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_sp_register()
@llgs_test
def test_stop_notification_contains_sp_register_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_sp_register()
@ -183,7 +173,6 @@ class TestGdbRemoteExpeditedRegisters(
def test_stop_notification_contains_vg_register_llgs(self):
if not self.isAArch64SVE():
self.skipTest('SVE registers must be supported.')
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_aarch64_vg_register()

View File

@ -102,14 +102,12 @@ class TestGdbRemoteHostInfo(GdbRemoteTestCaseBase):
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
@debugserver_test
def test_qHostInfo_returns_at_least_one_key_val_pair_debugserver(self):
self.init_debugserver_test()
self.build()
self.get_qHostInfo_response()
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
@llgs_test
def test_qHostInfo_returns_at_least_one_key_val_pair_llgs(self):
self.init_llgs_test()
self.build()
self.get_qHostInfo_response()
@ -117,7 +115,6 @@ class TestGdbRemoteHostInfo(GdbRemoteTestCaseBase):
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
@debugserver_test
def test_qHostInfo_contains_darwin_required_keys_debugserver(self):
self.init_debugserver_test()
self.build()
host_info_dict = self.get_qHostInfo_response()
self.validate_darwin_minimum_host_info_keys(host_info_dict)
@ -126,7 +123,6 @@ class TestGdbRemoteHostInfo(GdbRemoteTestCaseBase):
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
@llgs_test
def test_qHostInfo_contains_darwin_required_keys_llgs(self):
self.init_llgs_test()
self.build()
host_info_dict = self.get_qHostInfo_response()
self.validate_darwin_minimum_host_info_keys(host_info_dict)

View File

@ -46,14 +46,12 @@ class TestGdbRemoteKill(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_attach_commandline_kill_after_initial_stop_debugserver(self):
self.init_debugserver_test()
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.init_llgs_test()
self.build()
self.set_inferior_startup_attach()
self.attach_commandline_kill_after_initial_stop()

View File

@ -37,7 +37,6 @@ class TestGdbRemoteModuleInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
def test_module_info(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.module_info()

View File

@ -36,13 +36,11 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@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.init_debugserver_test()
self.build()
self.qProcessInfo_returns_running_process()
@llgs_test
def test_qProcessInfo_returns_running_process_llgs(self):
self.init_llgs_test()
self.build()
self.qProcessInfo_returns_running_process()
@ -69,14 +67,12 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@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):
self.init_debugserver_test()
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.init_llgs_test()
self.build()
self.set_inferior_startup_attach()
self.attach_commandline_qProcessInfo_reports_correct_pid()
@ -101,13 +97,11 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@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.init_debugserver_test()
self.build()
self.qProcessInfo_reports_valid_endian()
@llgs_test
def test_qProcessInfo_reports_valid_endian_llgs(self):
self.init_llgs_test()
self.build()
self.qProcessInfo_reports_valid_endian()
@ -162,20 +156,17 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
@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.init_debugserver_test()
self.build()
self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
@skipUnlessDarwin
@llgs_test
def test_qProcessInfo_contains_cputype_cpusubtype_llgs_darwin(self):
self.init_llgs_test()
self.build()
self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
@llgs_test
def test_qProcessInfo_contains_triple_ppid_llgs(self):
self.init_llgs_test()
self.build()
self.qProcessInfo_contains_keys(set(['triple', 'parent-pid']))
@ -183,7 +174,6 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
@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.init_debugserver_test()
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
@ -193,7 +183,6 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessDarwin
@llgs_test
def test_qProcessInfo_does_not_contain_triple_llgs_darwin(self):
self.init_llgs_test()
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
@ -203,6 +192,5 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipIfDarwin
@llgs_test
def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs(self):
self.init_llgs_test()
self.build()
self.qProcessInfo_does_not_contain_keys(set(['cputype', 'cpusubtype']))

View File

@ -95,7 +95,6 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_grp_register_save_restore_works_with_suffix_debugserver(self):
USE_THREAD_SUFFIX = True
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
@ -103,7 +102,6 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
def test_grp_register_save_restore_works_with_suffix_llgs(self):
USE_THREAD_SUFFIX = True
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
@ -111,7 +109,6 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_grp_register_save_restore_works_no_suffix_debugserver(self):
USE_THREAD_SUFFIX = False
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
@ -119,7 +116,6 @@ class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
def test_grp_register_save_restore_works_no_suffix_llgs(self):
USE_THREAD_SUFFIX = False
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.grp_register_save_restore_works(USE_THREAD_SUFFIX)

View File

@ -13,7 +13,6 @@ class TestGdbRemoteSingleStep(gdbremote_testcase.GdbRemoteTestCaseBase):
@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.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(
@ -23,7 +22,6 @@ class TestGdbRemoteSingleStep(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
@skipIf(triple='^mips')
def test_single_step_only_steps_one_instruction_with_s_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(

View File

@ -177,14 +177,12 @@ class TestGdbRemoteThreadsInStopReply(
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
@debugserver_test
def test_QListThreadsInStopReply_supported_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.QListThreadsInStopReply_supported()
@llgs_test
def test_QListThreadsInStopReply_supported_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.QListThreadsInStopReply_supported()
@ -199,7 +197,6 @@ class TestGdbRemoteThreadsInStopReply(
@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.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.stop_reply_reports_multiple_threads(5)
@ -212,7 +209,6 @@ class TestGdbRemoteThreadsInStopReply(
@skipIfNetBSD
@llgs_test
def test_stop_reply_reports_multiple_threads_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_reply_reports_multiple_threads(5)
@ -226,7 +222,6 @@ class TestGdbRemoteThreadsInStopReply(
@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.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.no_QListThreadsInStopReply_supplies_no_threads(5)
@ -235,7 +230,6 @@ class TestGdbRemoteThreadsInStopReply(
@skipIfNetBSD
@llgs_test
def test_no_QListThreadsInStopReply_supplies_no_threads_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.no_QListThreadsInStopReply_supplies_no_threads(5)
@ -265,7 +259,6 @@ class TestGdbRemoteThreadsInStopReply(
@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.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.stop_reply_reports_correct_threads(5)
@ -274,7 +267,6 @@ class TestGdbRemoteThreadsInStopReply(
@skipIfNetBSD
@llgs_test
def test_stop_reply_reports_correct_threads_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_reply_reports_correct_threads(5)
@ -300,7 +292,6 @@ class TestGdbRemoteThreadsInStopReply(
@skipIfNetBSD
@llgs_test
def test_stop_reply_contains_thread_pcs_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.stop_reply_contains_thread_pcs(5)
@ -308,7 +299,6 @@ class TestGdbRemoteThreadsInStopReply(
@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.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.stop_reply_contains_thread_pcs(5)

View File

@ -117,7 +117,6 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_qThreadStopInfo_works_for_multiple_threads_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_works_for_multiple_threads(self.THREAD_COUNT)
@ -125,7 +124,6 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
@skipIfNetBSD
def test_qThreadStopInfo_works_for_multiple_threads_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_works_for_multiple_threads(self.THREAD_COUNT)
@ -157,7 +155,6 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(
@ -168,7 +165,6 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_llgs(
self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(
@ -187,7 +183,6 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@unittest2.skip("MacOSX doesn't have a default thread name")
@debugserver_test
def test_qThreadStopInfo_has_valid_thread_names_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")
@ -197,7 +192,6 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["linux", "windows"])
@llgs_test
def test_qThreadStopInfo_has_valid_thread_names_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")

View File

@ -41,56 +41,48 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@debugserver_test
def test_vCont_supports_c_debugserver(self):
self.init_debugserver_test()
self.build()
self.vCont_supports_c()
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@llgs_test
def test_vCont_supports_c_llgs(self):
self.init_llgs_test()
self.build()
self.vCont_supports_c()
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@debugserver_test
def test_vCont_supports_C_debugserver(self):
self.init_debugserver_test()
self.build()
self.vCont_supports_C()
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@llgs_test
def test_vCont_supports_C_llgs(self):
self.init_llgs_test()
self.build()
self.vCont_supports_C()
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@debugserver_test
def test_vCont_supports_s_debugserver(self):
self.init_debugserver_test()
self.build()
self.vCont_supports_s()
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@llgs_test
def test_vCont_supports_s_llgs(self):
self.init_llgs_test()
self.build()
self.vCont_supports_s()
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@debugserver_test
def test_vCont_supports_S_debugserver(self):
self.init_debugserver_test()
self.build()
self.vCont_supports_S()
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@llgs_test
def test_vCont_supports_S_llgs(self):
self.init_llgs_test()
self.build()
self.vCont_supports_S()
@ -98,7 +90,6 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(
@ -109,7 +100,6 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipIf(triple='^mips')
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(
@ -119,7 +109,6 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_single_step_only_steps_one_instruction_with_vCont_s_thread_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(
@ -131,7 +120,6 @@ class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
def test_single_step_only_steps_one_instruction_with_vCont_s_thread_llgs(
self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(

View File

@ -47,7 +47,6 @@ class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["netbsd"])
@debugserver_test
def test_signal_one_thread_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.signal_one_thread()
@ -55,7 +54,6 @@ class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["netbsd"])
@llgs_test
def test_signal_one_thread_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.signal_one_thread()
@ -76,7 +74,6 @@ class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["netbsd"])
@debugserver_test
def test_signal_all_threads_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.signal_all_threads()
@ -84,7 +81,6 @@ class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["netbsd"])
@llgs_test
def test_signal_all_threads_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.signal_all_threads()
@ -105,7 +101,6 @@ class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["netbsd"])
@debugserver_test
def test_signal_two_of_three_threads_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.signal_two_of_three_threads()
@ -113,7 +108,6 @@ class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["netbsd"])
@llgs_test
def test_signal_two_of_three_threads_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.signal_two_of_three_threads()
@ -134,7 +128,6 @@ class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["netbsd"])
@debugserver_test
def test_signal_two_signals_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.signal_two_signals()
@ -142,7 +135,6 @@ class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
@skipUnlessPlatform(["netbsd"])
@llgs_test
def test_signal_two_signals_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.signal_two_signals()

View File

@ -27,12 +27,10 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_exe_starts_debugserver(self):
self.init_debugserver_test()
server = self.connect_to_debug_monitor()
@llgs_test
def test_exe_starts_llgs(self):
self.init_llgs_test()
server = self.connect_to_debug_monitor()
def thread_suffix_supported(self):
@ -50,12 +48,10 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_thread_suffix_supported_debugserver(self):
self.init_debugserver_test()
self.thread_suffix_supported()
@llgs_test
def test_thread_suffix_supported_llgs(self):
self.init_llgs_test()
self.thread_suffix_supported()
def list_threads_in_stop_reply_supported(self):
@ -72,12 +68,10 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_list_threads_in_stop_reply_supported_debugserver(self):
self.init_debugserver_test()
self.list_threads_in_stop_reply_supported()
@llgs_test
def test_list_threads_in_stop_reply_supported_llgs(self):
self.init_llgs_test()
self.list_threads_in_stop_reply_supported()
def c_packet_works(self):
@ -92,13 +86,11 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_c_packet_works_debugserver(self):
self.init_debugserver_test()
self.build()
self.c_packet_works()
@llgs_test
def test_c_packet_works_llgs(self):
self.init_llgs_test()
self.build()
self.c_packet_works()
@ -117,7 +109,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_inferior_print_exit_debugserver(self):
self.init_debugserver_test()
self.build()
self.inferior_print_exit()
@ -125,7 +116,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@llgs_test
@expectedFlakeyLinux("llvm.org/pr25652")
def test_inferior_print_exit_llgs(self):
self.init_llgs_test()
self.build()
self.inferior_print_exit()
@ -145,13 +135,11 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_first_launch_stop_reply_thread_matches_first_qC_debugserver(self):
self.init_debugserver_test()
self.build()
self.first_launch_stop_reply_thread_matches_first_qC()
@llgs_test
def test_first_launch_stop_reply_thread_matches_first_qC_llgs(self):
self.init_llgs_test()
self.build()
self.first_launch_stop_reply_thread_matches_first_qC()
@ -181,14 +169,12 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_attach_commandline_continue_app_exits_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_attach()
self.attach_commandline_continue_app_exits()
@llgs_test
def test_attach_commandline_continue_app_exits_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_attach()
self.attach_commandline_continue_app_exits()
@ -212,13 +198,11 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qRegisterInfo_returns_one_valid_result_debugserver(self):
self.init_debugserver_test()
self.build()
self.qRegisterInfo_returns_one_valid_result()
@llgs_test
def test_qRegisterInfo_returns_one_valid_result_llgs(self):
self.init_llgs_test()
self.build()
self.qRegisterInfo_returns_one_valid_result()
@ -237,13 +221,11 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qRegisterInfo_returns_all_valid_results_debugserver(self):
self.init_debugserver_test()
self.build()
self.qRegisterInfo_returns_all_valid_results()
@llgs_test
def test_qRegisterInfo_returns_all_valid_results_llgs(self):
self.init_llgs_test()
self.build()
self.qRegisterInfo_returns_all_valid_results()
@ -278,13 +260,11 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qRegisterInfo_contains_required_generics_debugserver(self):
self.init_debugserver_test()
self.build()
self.qRegisterInfo_contains_required_generics()
@llgs_test
def test_qRegisterInfo_contains_required_generics_llgs(self):
self.init_llgs_test()
self.build()
self.qRegisterInfo_contains_required_generics()
@ -308,13 +288,11 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qRegisterInfo_contains_at_least_one_register_set_debugserver(
self):
self.init_debugserver_test()
self.build()
self.qRegisterInfo_contains_at_least_one_register_set()
@llgs_test
def test_qRegisterInfo_contains_at_least_one_register_set_llgs(self):
self.init_llgs_test()
self.build()
self.qRegisterInfo_contains_at_least_one_register_set()
@ -360,7 +338,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@expectedFailureAll(oslist=["netbsd"])
@llgs_test
def test_qRegisterInfo_contains_avx_registers_llgs(self):
self.init_llgs_test()
self.build()
self.qRegisterInfo_contains_avx_registers()
@ -382,14 +359,12 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qThreadInfo_contains_thread_launch_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_contains_thread()
@llgs_test
def test_qThreadInfo_contains_thread_launch_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_contains_thread()
@ -397,7 +372,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qThreadInfo_contains_thread_attach_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_contains_thread()
@ -405,7 +379,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@expectedFailureAll(oslist=["windows"]) # expect one more thread stopped
@llgs_test
def test_qThreadInfo_contains_thread_attach_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_contains_thread()
@ -441,14 +414,12 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qThreadInfo_matches_qC_launch_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_matches_qC()
@llgs_test
def test_qThreadInfo_matches_qC_launch_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_matches_qC()
@ -456,7 +427,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qThreadInfo_matches_qC_attach_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_matches_qC()
@ -464,7 +434,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@expectedFailureAll(oslist=["windows"]) # expect one more thread stopped
@llgs_test
def test_qThreadInfo_matches_qC_attach_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_matches_qC()
@ -526,7 +495,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@ -535,7 +503,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@llgs_test
def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_llgs(
self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@ -544,7 +511,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_attach()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@ -553,7 +519,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@llgs_test
def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs(
self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_attach()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@ -593,7 +558,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_Hg_switches_to_3_threads_launch_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.Hg_switches_to_3_threads()
@ -601,7 +565,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@expectedFailureAll(oslist=["windows"]) # expect 4 threads
@llgs_test
def test_Hg_switches_to_3_threads_launch_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.Hg_switches_to_3_threads()
@ -609,7 +572,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_Hg_switches_to_3_threads_attach_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_attach()
self.Hg_switches_to_3_threads()
@ -617,7 +579,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@expectedFailureAll(oslist=["windows"]) # expecting one more thread
@llgs_test
def test_Hg_switches_to_3_threads_attach_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_attach()
self.Hg_switches_to_3_threads()
@ -737,7 +698,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_Hc_then_Csignal_signals_correct_thread_launch_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
# Darwin debugserver translates some signals like SIGSEGV into some gdb
@ -749,7 +709,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@expectedFailureNetBSD
@llgs_test
def test_Hc_then_Csignal_signals_correct_thread_launch_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.Hc_then_Csignal_signals_correct_thread(
@ -810,7 +769,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_m_packet_reads_memory_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.m_packet_reads_memory()
@ -818,7 +776,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfWindows # No pty support to test any inferior output
@llgs_test
def test_m_packet_reads_memory_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.m_packet_reads_memory()
@ -837,14 +794,12 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qMemoryRegionInfo_is_supported_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_is_supported()
@llgs_test
def test_qMemoryRegionInfo_is_supported_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_is_supported()
@ -901,7 +856,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qMemoryRegionInfo_reports_code_address_as_executable_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_code_address_as_executable()
@ -909,7 +863,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfWindows # No pty support to test any inferior output
@llgs_test
def test_qMemoryRegionInfo_reports_code_address_as_executable_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_code_address_as_executable()
@ -967,7 +920,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_stack_address_as_readable_writeable()
@ -976,7 +928,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@llgs_test
def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_llgs(
self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_stack_address_as_readable_writeable()
@ -1033,7 +984,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_debugserver(
self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
@ -1042,7 +992,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@llgs_test
def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_llgs(
self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
@ -1182,7 +1131,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_software_breakpoint_set_and_remove_work_debugserver(self):
self.init_debugserver_test()
if self.getArchitecture() == "arm":
# TODO: Handle case when setting breakpoint in thumb code
self.build(dictionary={'CFLAGS_EXTRAS': '-marm'})
@ -1195,7 +1143,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@llgs_test
@expectedFlakeyLinux("llvm.org/pr25652")
def test_software_breakpoint_set_and_remove_work_llgs(self):
self.init_llgs_test()
if self.getArchitecture() == "arm":
# TODO: Handle case when setting breakpoint in thumb code
self.build(dictionary={'CFLAGS_EXTRAS': '-marm'})
@ -1210,7 +1157,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIf(archs=no_match(['arm', 'aarch64']))
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_hardware_breakpoint_set_and_remove_work_debugserver(self):
self.init_debugserver_test()
if self.getArchitecture() == "arm":
# TODO: Handle case when setting breakpoint in thumb code
self.build(dictionary={'CFLAGS_EXTRAS': '-marm'})
@ -1223,7 +1169,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipUnlessPlatform(oslist=['linux'])
@skipIf(archs=no_match(['arm', 'aarch64']))
def test_hardware_breakpoint_set_and_remove_work_llgs(self):
self.init_llgs_test()
if self.getArchitecture() == "arm":
# TODO: Handle case when setting breakpoint in thumb code
self.build(dictionary={'CFLAGS_EXTRAS': '-marm'})
@ -1249,14 +1194,12 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_qSupported_returns_known_stub_features_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.qSupported_returns_known_stub_features()
@llgs_test
def test_qSupported_returns_known_stub_features_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.qSupported_returns_known_stub_features()
@ -1323,7 +1266,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_written_M_content_reads_back_correctly_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.written_M_content_reads_back_correctly()
@ -1332,7 +1274,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@llgs_test
@expectedFlakeyLinux("llvm.org/pr25652")
def test_written_M_content_reads_back_correctly_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.written_M_content_reads_back_correctly()
@ -1374,14 +1315,12 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_P_writes_all_gpr_registers_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.P_writes_all_gpr_registers()
@llgs_test
def test_P_writes_all_gpr_registers_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.P_writes_all_gpr_registers()
@ -1499,7 +1438,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@debugserver_test
@skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
def test_P_and_p_thread_suffix_work_debugserver(self):
self.init_debugserver_test()
self.build()
self.set_inferior_startup_launch()
self.P_and_p_thread_suffix_work()
@ -1507,7 +1445,6 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
@skipIfWindows
@llgs_test
def test_P_and_p_thread_suffix_work_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.P_and_p_thread_suffix_work()

View File

@ -15,13 +15,11 @@ class TestGdbRemoteConnection(gdbremote_testcase.GdbRemoteTestCaseBase):
# <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
@skipIfDarwinEmbedded
def test_reverse_connect_debugserver(self):
self.init_debugserver_test()
self._reverse_connect()
@llgs_test
@skipIfRemote # reverse connect is not a supported use case for now
def test_reverse_connect_llgs(self):
self.init_llgs_test()
self._reverse_connect()
def _reverse_connect(self):
@ -33,14 +31,12 @@ class TestGdbRemoteConnection(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
@skipIfRemote
def test_named_pipe_debugserver(self):
self.init_debugserver_test()
self._named_pipe()
@llgs_test
@skipIfRemote
@skipIfWindows
def test_named_pipe_llgs(self):
self.init_llgs_test()
self._named_pipe()
def _named_pipe(self):

View File

@ -42,7 +42,6 @@ class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
@skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
def test_sid_is_same_without_setsid_debugserver(self):
self.init_debugserver_test()
self.set_inferior_startup_launch()
self.sid_is_same_without_setsid()
@ -50,14 +49,12 @@ class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
@skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
def test_sid_is_same_without_setsid_llgs(self):
self.init_llgs_test()
self.set_inferior_startup_launch()
self.sid_is_same_without_setsid()
@debugserver_test
@skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
def test_sid_is_different_with_setsid_debugserver(self):
self.init_debugserver_test()
self.set_inferior_startup_launch()
self.sid_is_different_with_setsid()
@ -65,14 +62,12 @@ class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
@skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
def test_sid_is_different_with_setsid_llgs(self):
self.init_llgs_test()
self.set_inferior_startup_launch()
self.sid_is_different_with_setsid()
@debugserver_test
@skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
def test_sid_is_different_with_S_debugserver(self):
self.init_debugserver_test()
self.set_inferior_startup_launch()
self.sid_is_different_with_S()
@ -80,6 +75,5 @@ class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
@skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
def test_sid_is_different_with_S_llgs(self):
self.init_llgs_test()
self.set_inferior_startup_launch()
self.sid_is_different_with_S()

View File

@ -31,7 +31,6 @@ class TestGdbRemoteAbort(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_inferior_abort_received_debugserver(self):
self.init_debugserver_test()
self.build()
self.inferior_abort_received()
@ -40,6 +39,5 @@ class TestGdbRemoteAbort(gdbremote_testcase.GdbRemoteTestCaseBase):
# std::abort() on <= API 16 raises SIGSEGV - b.android.com/179836
@expectedFailureAndroid(api_levels=list(range(16 + 1)))
def test_inferior_abort_received_llgs(self):
self.init_llgs_test()
self.build()
self.inferior_abort_received()

View File

@ -33,13 +33,11 @@ class TestGdbRemoteSegFault(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
def test_inferior_seg_fault_received_debugserver(self):
self.init_debugserver_test()
self.build()
self.inferior_seg_fault_received(self.GDB_REMOTE_STOP_CODE_BAD_ACCESS)
@skipIfWindows # No signal is sent on Windows.
@llgs_test
def test_inferior_seg_fault_received_llgs(self):
self.init_llgs_test()
self.build()
self.inferior_seg_fault_received(lldbutil.get_signal_number('SIGSEGV'))

View File

@ -12,7 +12,6 @@ class TestGdbRemoteLibrariesSvr4Support(gdbremote_testcase.GdbRemoteTestCaseBase
FEATURE_NAME = "qXfer:libraries-svr4:read"
def setup_test(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
env = {}

View File

@ -51,7 +51,6 @@ class TestGdbRemoteMemoryAllocation(gdbremote_testcase.GdbRemoteTestCaseBase):
def test_supported(self):
"""Make sure (de)allocation works on platforms where it's supposed to
work"""
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
procs = self.prep_debug_monitor_and_inferior()
@ -68,7 +67,6 @@ class TestGdbRemoteMemoryAllocation(gdbremote_testcase.GdbRemoteTestCaseBase):
"""Make sure we get an "unsupported" error on platforms where the
feature is not implemented."""
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
procs = self.prep_debug_monitor_and_inferior()
@ -83,7 +81,6 @@ class TestGdbRemoteMemoryAllocation(gdbremote_testcase.GdbRemoteTestCaseBase):
def test_bad_packet(self):
"""Make sure we get a proper error for malformed packets."""
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
procs = self.prep_debug_monitor_and_inferior()

View File

@ -16,7 +16,6 @@ class TestPlatformProcessConnect(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureAll(hostoslist=["windows"], triple='.*-android')
def test_platform_process_connect(self):
self.build()
self.init_llgs_test()
working_dir = lldb.remote_platform.GetWorkingDirectory()
src = lldb.SBFileSpec(self.getBuildArtifact("a.out"))

View File

@ -53,7 +53,6 @@ class TestGdbRemoteGPacket(gdbremote_testcase.GdbRemoteTestCaseBase):
@debugserver_test
@skipIfDarwinEmbedded
def test_g_packet_debugserver(self):
self.init_debugserver_test()
self.run_test_g_packet()
@skipIf(archs=no_match(["x86_64"]))
@ -140,7 +139,6 @@ class TestGdbRemoteGPacket(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureNetBSD
@llgs_test
def test_g_returns_correct_data_with_suffix_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.g_returns_correct_data(True)
@ -149,7 +147,6 @@ class TestGdbRemoteGPacket(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureNetBSD
@llgs_test
def test_g_returns_correct_data_no_suffix_llgs(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
self.g_returns_correct_data(False)

View File

@ -15,7 +15,6 @@ class TestGdbRemoteTargetXmlPacket(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureNetBSD
@llgs_test
def test_g_target_xml_returns_correct_data(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()

View File

@ -49,7 +49,6 @@ class TestGdbRemote_QPassSignals(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
@skipUnlessPlatform(["linux", "android"])
def test_q_pass_signals(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
procs = self.prep_debug_monitor_and_inferior()
@ -65,7 +64,6 @@ class TestGdbRemote_QPassSignals(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
@skipUnlessPlatform(["linux", "android"])
def test_change_signals_at_runtime(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
procs = self.prep_debug_monitor_and_inferior()
@ -84,7 +82,6 @@ class TestGdbRemote_QPassSignals(gdbremote_testcase.GdbRemoteTestCaseBase):
@expectedFailureNetBSD
@llgs_test
def test_default_signals_behavior(self):
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
procs = self.prep_debug_monitor_and_inferior()
@ -99,7 +96,6 @@ class TestGdbRemote_QPassSignals(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
@skipUnlessPlatform(["linux", "android"])
def test_support_q_pass_signals(self):
self.init_llgs_test()
self.build()
# Start up the stub and start/prep the inferior.

View File

@ -32,7 +32,6 @@ class TestGdbRemoteThreadName(gdbremote_testcase.GdbRemoteTestCaseBase):
@llgs_test
def test(self):
""" Make sure lldb-server can retrieve inferior thread name"""
self.init_llgs_test()
self.build()
self.set_inferior_startup_launch()
procs = self.prep_debug_monitor_and_inferior()