diff options
author | Jason Molenda <jmolenda@apple.com> | 2017-09-21 23:00:19 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2017-09-21 23:00:19 +0000 |
commit | 182a8083c1e26577dfc52e78dbd95d221daed20d (patch) | |
tree | c713e1a2f372a60fa5c91a4c5e56e5de5229d245 /lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py | |
parent | 8f094c94fd62aaf82e5e6abb1cd8eaa1bd03284e (diff) | |
download | bcm5719-llvm-182a8083c1e26577dfc52e78dbd95d221daed20d.tar.gz bcm5719-llvm-182a8083c1e26577dfc52e78dbd95d221daed20d.zip |
Initial patchset to get the testsuite running against armv7 and arm64 iOS devices.
Normal customer devices won't be able to run these devices, we're hoping to get
a public facing bot set up at some point.
There will be some smaller follow-on patches. The changes to tools/lldb-server are
verbose and I'm not thrilled with having to skip all of these tests manually.
There are a few places where I'm making the assumption that "armv7", "armv7k", "arm64"
means it's an ios device, and I need to review & clean these up with an OS check
as well. (Android will show up as "arm" and "aarch64" so by pure luck they shouldn't
cause problems, but it's not an assumption I want to rely on).
I'll be watching the bots for the rest of today; if any problems are introduced by
this patch I'll revert it - if anyone sees a problem with their bot that I don't
see, please do the same. I know it's a rather large patch.
One change I had to make specifically for iOS devices was that debugserver can't
create files. There were several tests that launch the inferior process redirecting
its output to a file, then they retrieve the file. They were not trying to test
file redirection in these tests, so I rewrote those to write their output to a file
directly.
llvm-svn: 313932
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py index 6f36fbea470..a4f306efdc9 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py @@ -29,6 +29,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod mydir = TestBase.compute_mydir(__file__) @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() @@ -46,6 +47,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @debugserver_test + @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet def test_start_no_ack_mode_debugserver(self): self.init_debugserver_test() self.start_no_ack_mode() @@ -68,6 +70,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @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() @@ -89,6 +92,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @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() @@ -114,6 +118,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @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() @@ -146,6 +151,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertIsNotNone(context) @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() @@ -181,6 +187,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @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() @@ -216,6 +223,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod procs["inferior"].pid, False)) @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() @@ -254,6 +262,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod @debugserver_test @expectedFailureDarwin("llvm.org/pr25486") + @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() @@ -286,6 +295,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod @debugserver_test @expectedFailureDarwin("llvm.org/pr25486") + @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() @@ -332,6 +342,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertTrue('flags' in generic_regs) @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() @@ -367,6 +378,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertTrue(len(register_sets) >= 1) @debugserver_test + @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() @@ -446,6 +458,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(len(threads), 1) @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() @@ -460,6 +473,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.qThreadInfo_contains_thread() @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() @@ -502,6 +516,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(threads[0], QC_thread_id) @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() @@ -516,6 +531,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.qThreadInfo_matches_qC() @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() @@ -579,6 +595,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod reg_index += 1 @debugserver_test + @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() @@ -595,6 +612,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.p_returns_correct_data_size_for_each_qRegisterInfo() @debugserver_test + @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() @@ -643,6 +661,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(int(context.get("thread_id"), 16), thread) @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() @@ -657,6 +676,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.Hg_switches_to_3_threads() @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() @@ -783,6 +803,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod @unittest2.expectedFailure() @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() @@ -852,6 +873,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(read_contents, MEMORY_CONTENTS) @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() @@ -877,6 +899,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.expect_gdbremote_sequence() @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() @@ -939,6 +962,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assert_address_within_memory_region(code_address, mem_region_dict) @debugserver_test + @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() @@ -1003,6 +1027,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod stack_address, mem_region_dict) @debugserver_test + @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() @@ -1067,6 +1092,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assert_address_within_memory_region(heap_address, mem_region_dict) @debugserver_test + @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() @@ -1215,6 +1241,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertIsNotNone(context) @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": @@ -1241,6 +1268,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod @skipUnlessPlatform(oslist=['linux']) @expectedFailureAndroid @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": @@ -1280,6 +1308,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertTrue(len(supported_dict) > 0) @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() @@ -1353,6 +1382,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertEqual(printed_message, TEST_MESSAGE + "X") @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() @@ -1402,6 +1432,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod # Come back to this. I have the test rigged to verify that at least some # of the bit-flip writes work. @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() @@ -1526,6 +1557,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod # Note: as of this moment, a hefty number of the GPR writes are failing # with E32 (everything except rax-rdx, rdi, rsi, rbp). @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() |