diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
8 files changed, 29 insertions, 18 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm b/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm index f7383a5a14d..9d4630dc7c4 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm +++ b/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm @@ -6,7 +6,7 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#import <Cocoa/Cocoa.h> +#import <Foundation/Foundation.h> #include <vector> int main (int argc, char const *argv[]) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py b/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py index 06ca772073a..a2d2cf12cdc 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py @@ -90,7 +90,7 @@ class FrameAPITestCase(TestBase): # Make sure on arm targets we dont mismatch PC value on the basis of thumb bit. # Frame PC will not have thumb bit set in case of a thumb # instruction as PC. - if self.getArchitecture() in ['arm']: + if self.getArchitecture() in ['arm', 'armv7', 'armv7k']: pc_value_int &= ~1 self.assertTrue( pc_value_int == frame.GetPC(), diff --git a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py index 44dd4a61850..fb4e54aa0bc 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py @@ -79,6 +79,7 @@ class HelloWorldTestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24600") @skipIfiOSSimulator + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_with_attach_to_process_with_id_api(self): """Create target, spawn a process, and attach to it with process id.""" self.build(dictionary=self.d) @@ -108,6 +109,7 @@ class HelloWorldTestCase(TestBase): @add_test_categories(['pyapi']) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24600") @skipIfiOSSimulator + @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails def test_with_attach_to_process_with_name_api(self): """Create target, spawn a process, and attach to it with process name.""" self.build(dictionary=self.d) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/main.c b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/main.c index 1b942d0db15..001e9c01e6e 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/main.c +++ b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/main.c @@ -1,5 +1,5 @@ #include <stdio.h> - +#include <unistd.h> int main(int argc, char const *argv[]) { lldb_enable_attach(); @@ -10,9 +10,8 @@ int main(int argc, char const *argv[]) // Waiting to be attached by the debugger, otherwise. char line[100]; - while (fgets(line, sizeof(line), stdin)) { // Waiting to be attached... - printf("input line=>%s\n", line); - } + while (1) + sleep (1); // Waiting to be attached... printf("Exiting now\n"); } diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py index 49a78888ad8..a19cc5c375f 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py @@ -76,17 +76,18 @@ class RegistersIteratorTestCase(TestBase): REGs = lldbutil.get_ESRs(frame) if self.platformIsDarwin(): - num = len(REGs) - if self.TraceOn(): - print( - "\nNumber of exception state registers: %d" % - num) - for reg in REGs: - self.assertTrue(reg) + if self.getArchitecture() != 'armv7' and self.getArchitecture() != 'armv7k': + num = len(REGs) if self.TraceOn(): print( - "%s => %s" % - (reg.GetName(), reg.GetValue())) + "\nNumber of exception state registers: %d" % + num) + for reg in REGs: + self.assertTrue(reg) + if self.TraceOn(): + print( + "%s => %s" % + (reg.GetName(), reg.GetValue())) else: self.assertIsNone(REGs) @@ -99,7 +100,8 @@ class RegistersIteratorTestCase(TestBase): REGs = lldbutil.get_registers( frame, "Exception State Registers") if self.platformIsDarwin(): - self.assertIsNotNone(REGs) + if self.getArchitecture() != 'armv7' and self.getArchitecture() != 'armv7k': + self.assertIsNotNone(REGs) else: self.assertIsNone(REGs) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py b/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py index 5314930ff99..71f77b36880 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py @@ -59,6 +59,7 @@ class ProcessIOTestCase(TestBase): @skipIfWindows # stdio manipulation unsupported on Windows @add_test_categories(['pyapi']) @expectedFlakeyLinux(bugnumber="llvm.org/pr26437") + @skipIfDarwinEmbedded # debugserver can't create/write files on the device def test_stdout_redirection(self): """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR.""" self.build() @@ -72,6 +73,7 @@ class ProcessIOTestCase(TestBase): @skipIfWindows # stdio manipulation unsupported on Windows @add_test_categories(['pyapi']) @expectedFlakeyLinux(bugnumber="llvm.org/pr26437") + @skipIfDarwinEmbedded # debugserver can't create/write files on the device def test_stderr_redirection(self): """Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT.""" self.build() @@ -85,6 +87,7 @@ class ProcessIOTestCase(TestBase): @skipIfWindows # stdio manipulation unsupported on Windows @add_test_categories(['pyapi']) @expectedFlakeyLinux(bugnumber="llvm.org/pr26437") + @skipIfDarwinEmbedded # debugserver can't create/write files on the device def test_stdout_stderr_redirection(self): """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN.""" self.build() diff --git a/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m b/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m index 599d36107f4..6ac70d1d06b 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m +++ b/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m @@ -6,7 +6,7 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#import <Cocoa/Cocoa.h> +#import <Foundation/Foundation.h> @interface ThisClassTestsThings : NSObject @end diff --git a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py index 33f1be77ad5..7ce312f52de 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py @@ -19,6 +19,10 @@ class WatchpointIteratorTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + # hardware watchpoints are not reported with a hardware index # on armv7 on ios devices + def affected_by_radar_34564183(self): + return (self.getArchitecture() == 'armv7' or self.getArchitecture() == 'armv7k') and self.platformIsDarwin() + def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -99,7 +103,8 @@ class WatchpointIteratorTestCase(TestBase): # meaningful hardware index at this point. Exercise the printed repr of # SBWatchpointLocation. print(watchpoint) - self.assertTrue(watchpoint.GetHardwareIndex() != -1) + if not self.affected_by_radar_34564183(): + self.assertTrue(watchpoint.GetHardwareIndex() != -1) # SBWatchpoint.GetDescription() takes a description level arg. print(lldbutil.get_description(watchpoint, lldb.eDescriptionLevelFull)) |