mydir = TestBase.compute_mydir(__file__)
- @debugserver_test
- def test_exe_starts_debugserver(self):
- server = self.connect_to_debug_monitor()
-
- @llgs_test
- def test_exe_starts_llgs(self):
- server = self.connect_to_debug_monitor()
-
- def thread_suffix_supported(self):
+ def test_thread_suffix_supported(self):
server = self.connect_to_debug_monitor()
self.assertIsNotNone(server)
self.expect_gdbremote_sequence()
- @debugserver_test
- def test_thread_suffix_supported_debugserver(self):
- self.thread_suffix_supported()
-
- @llgs_test
- def test_thread_suffix_supported_llgs(self):
- self.thread_suffix_supported()
- def list_threads_in_stop_reply_supported(self):
+ def test_list_threads_in_stop_reply_supported(self):
server = self.connect_to_debug_monitor()
self.assertIsNotNone(server)
True)
self.expect_gdbremote_sequence()
- @debugserver_test
- def test_list_threads_in_stop_reply_supported_debugserver(self):
- self.list_threads_in_stop_reply_supported()
-
- @llgs_test
- def test_list_threads_in_stop_reply_supported_llgs(self):
- self.list_threads_in_stop_reply_supported()
-
- def c_packet_works(self):
+ def test_c_packet_works(self):
+ self.build()
procs = self.prep_debug_monitor_and_inferior()
self.test_sequence.add_log_lines(
["read packet: $c#63",
self.expect_gdbremote_sequence()
- @debugserver_test
- def test_c_packet_works_debugserver(self):
- self.build()
- self.c_packet_works()
-
- @llgs_test
- def test_c_packet_works_llgs(self):
+ @skipIfWindows # No pty support to test any inferior output
+ def test_inferior_print_exit(self):
self.build()
- self.c_packet_works()
-
- def inferior_print_exit(self):
procs = self.prep_debug_monitor_and_inferior(
inferior_args=["hello, world"])
self.test_sequence.add_log_lines(
context = self.expect_gdbremote_sequence()
self.assertIsNotNone(context)
- @debugserver_test
- def test_inferior_print_exit_debugserver(self):
- self.build()
- self.inferior_print_exit()
-
- @skipIfWindows # No pty support to test any inferior output
- @llgs_test
- @expectedFlakeyLinux("llvm.org/pr25652")
- def test_inferior_print_exit_llgs(self):
+ def test_first_launch_stop_reply_thread_matches_first_qC(self):
self.build()
- self.inferior_print_exit()
-
- def first_launch_stop_reply_thread_matches_first_qC(self):
procs = self.prep_debug_monitor_and_inferior()
self.test_sequence.add_log_lines(["read packet: $qC#00",
{"direction": "send",
True)
self.expect_gdbremote_sequence()
- @debugserver_test
- def test_first_launch_stop_reply_thread_matches_first_qC_debugserver(self):
- 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):
+ def test_attach_commandline_continue_app_exits(self):
self.build()
- self.first_launch_stop_reply_thread_matches_first_qC()
-
- def attach_commandline_continue_app_exits(self):
+ self.set_inferior_startup_attach()
procs = self.prep_debug_monitor_and_inferior()
self.test_sequence.add_log_lines(
["read packet: $vCont;c#a8",
lldbgdbserverutils.process_is_running(
procs["inferior"].pid, False))
- @debugserver_test
- def test_attach_commandline_continue_app_exits_debugserver(self):
+ def test_qRegisterInfo_returns_one_valid_result(self):
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.build()
- self.set_inferior_startup_attach()
- self.attach_commandline_continue_app_exits()
-
- def qRegisterInfo_returns_one_valid_result(self):
self.prep_debug_monitor_and_inferior()
self.test_sequence.add_log_lines(
["read packet: $qRegisterInfo0#00",
self.assert_valid_reg_info(
lldbgdbserverutils.parse_reg_info_response(reg_info_packet))
- @debugserver_test
- def test_qRegisterInfo_returns_one_valid_result_debugserver(self):
+ def test_qRegisterInfo_returns_all_valid_results(self):
self.build()
- self.qRegisterInfo_returns_one_valid_result()
-
- @llgs_test
- def test_qRegisterInfo_returns_one_valid_result_llgs(self):
- self.build()
- self.qRegisterInfo_returns_one_valid_result()
-
- def qRegisterInfo_returns_all_valid_results(self):
self.prep_debug_monitor_and_inferior()
self.add_register_info_collection_packets()
for reg_info in self.parse_register_info_packets(context):
self.assert_valid_reg_info(reg_info)
- @debugserver_test
- def test_qRegisterInfo_returns_all_valid_results_debugserver(self):
- self.build()
- self.qRegisterInfo_returns_all_valid_results()
-
- @llgs_test
- def test_qRegisterInfo_returns_all_valid_results_llgs(self):
+ def test_qRegisterInfo_contains_required_generics_debugserver(self):
self.build()
- self.qRegisterInfo_returns_all_valid_results()
-
- def qRegisterInfo_contains_required_generics(self):
self.prep_debug_monitor_and_inferior()
self.add_register_info_collection_packets()
# Ensure we have a flags register.
self.assertTrue('flags' in generic_regs)
- @debugserver_test
- def test_qRegisterInfo_contains_required_generics_debugserver(self):
- self.build()
- self.qRegisterInfo_contains_required_generics()
-
- @llgs_test
- def test_qRegisterInfo_contains_required_generics_llgs(self):
+ def test_qRegisterInfo_contains_at_least_one_register_set(self):
self.build()
- self.qRegisterInfo_contains_required_generics()
-
- def qRegisterInfo_contains_at_least_one_register_set(self):
self.prep_debug_monitor_and_inferior()
self.add_register_info_collection_packets()
reg_info['set']: 1 for reg_info in reg_infos if 'set' in reg_info}
self.assertTrue(len(register_sets) >= 1)
- @debugserver_test
- def test_qRegisterInfo_contains_at_least_one_register_set_debugserver(
- self):
- self.build()
- self.qRegisterInfo_contains_at_least_one_register_set()
-
- @llgs_test
- def test_qRegisterInfo_contains_at_least_one_register_set_llgs(self):
- self.build()
- self.qRegisterInfo_contains_at_least_one_register_set()
-
def targetHasAVX(self):
triple = self.dbg.GetSelectedPlatform().GetTriple()
f.close()
return " avx " in cpuinfo
- def qRegisterInfo_contains_avx_registers(self):
+ @expectedFailureAll(oslist=["windows"]) # no avx for now.
+ @expectedFailureAll(oslist=["netbsd"])
+ @add_test_categories(["llgs"])
+ def test_qRegisterInfo_contains_avx_registers(self):
+ self.build()
self.prep_debug_monitor_and_inferior()
self.add_register_info_collection_packets()
self.targetHasAVX(),
"Advanced Vector Extensions" in register_sets)
- @expectedFailureAll(oslist=["windows"]) # no avx for now.
- @expectedFailureAll(oslist=["netbsd"])
- @llgs_test
- def test_qRegisterInfo_contains_avx_registers_llgs(self):
- self.build()
- self.qRegisterInfo_contains_avx_registers()
-
def qThreadInfo_contains_thread(self):
procs = self.prep_debug_monitor_and_inferior()
self.add_threadinfo_collection_packets()
# We should have exactly one thread.
self.assertEqual(len(threads), 1)
- @debugserver_test
- def test_qThreadInfo_contains_thread_launch_debugserver(self):
+ def test_qThreadInfo_contains_thread_launch(self):
self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_contains_thread()
- @llgs_test
- def test_qThreadInfo_contains_thread_launch_llgs(self):
- self.build()
- self.set_inferior_startup_launch()
- self.qThreadInfo_contains_thread()
-
- @debugserver_test
- def test_qThreadInfo_contains_thread_attach_debugserver(self):
- self.build()
- self.set_inferior_startup_attach()
- self.qThreadInfo_contains_thread()
-
@expectedFailureAll(oslist=["windows"]) # expect one more thread stopped
- @llgs_test
- def test_qThreadInfo_contains_thread_attach_llgs(self):
+ def test_qThreadInfo_contains_thread_attach(self):
self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_contains_thread()
# Those two should be the same.
self.assertEqual(threads[0], QC_thread_id)
- @debugserver_test
- def test_qThreadInfo_matches_qC_launch_debugserver(self):
- self.build()
- self.set_inferior_startup_launch()
- self.qThreadInfo_matches_qC()
-
- @llgs_test
- def test_qThreadInfo_matches_qC_launch_llgs(self):
+ def test_qThreadInfo_matches_qC_launch(self):
self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_matches_qC()
- @debugserver_test
- def test_qThreadInfo_matches_qC_attach_debugserver(self):
- self.build()
- self.set_inferior_startup_attach()
- self.qThreadInfo_matches_qC()
-
@expectedFailureAll(oslist=["windows"]) # expect one more thread stopped
- @llgs_test
- def test_qThreadInfo_matches_qC_attach_llgs(self):
+ def test_qThreadInfo_matches_qC_attach(self):
self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_matches_qC()
- def p_returns_correct_data_size_for_each_qRegisterInfo(self):
+ @expectedFailureAll(oslist=["netbsd"])
+ def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch(self):
+ self.build()
+ self.set_inferior_startup_launch()
procs = self.prep_debug_monitor_and_inferior()
self.add_register_info_collection_packets()
# Increment loop
reg_index += 1
- @debugserver_test
- def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_debugserver(
- self):
- self.build()
- self.set_inferior_startup_launch()
- self.p_returns_correct_data_size_for_each_qRegisterInfo()
-
- @expectedFailureAll(oslist=["netbsd"])
- @llgs_test
- def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_llgs(
- self):
- self.build()
- self.set_inferior_startup_launch()
- self.p_returns_correct_data_size_for_each_qRegisterInfo()
-
- @debugserver_test
- def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_debugserver(
- self):
- self.build()
- self.set_inferior_startup_attach()
- self.p_returns_correct_data_size_for_each_qRegisterInfo()
-
- @expectedFailureAll(oslist=["netbsd"])
- @llgs_test
- def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs(
- self):
- self.build()
- self.set_inferior_startup_attach()
- self.p_returns_correct_data_size_for_each_qRegisterInfo()
-
def Hg_switches_to_3_threads(self):
# Startup the inferior with three threads (main + 2 new ones).
procs = self.prep_debug_monitor_and_inferior(
self.assertIsNotNone(context.get("thread_id"))
self.assertEqual(int(context.get("thread_id"), 16), thread)
- @debugserver_test
- def test_Hg_switches_to_3_threads_launch_debugserver(self):
- self.build()
- self.set_inferior_startup_launch()
- self.Hg_switches_to_3_threads()
-
@expectedFailureAll(oslist=["windows"]) # expect 4 threads
- @llgs_test
- def test_Hg_switches_to_3_threads_launch_llgs(self):
+ def test_Hg_switches_to_3_threads_launch(self):
self.build()
self.set_inferior_startup_launch()
self.Hg_switches_to_3_threads()
- @debugserver_test
- def test_Hg_switches_to_3_threads_attach_debugserver(self):
- self.build()
- self.set_inferior_startup_attach()
- self.Hg_switches_to_3_threads()
-
@expectedFailureAll(oslist=["windows"]) # expecting one more thread
- @llgs_test
- def test_Hg_switches_to_3_threads_attach_llgs(self):
+ def test_Hg_switches_to_3_threads_attach(self):
self.build()
self.set_inferior_startup_attach()
self.Hg_switches_to_3_threads()