summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/python_api
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api')
-rw-r--r--packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py22
-rw-r--r--packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py42
-rw-r--r--packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py4
-rw-r--r--packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py22
-rw-r--r--packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm2
-rw-r--r--packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py0
-rw-r--r--packages/Python/lldbsuite/test/python_api/frame/TestFrames.py2
-rw-r--r--packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py2
-rw-r--r--packages/Python/lldbsuite/test/python_api/hello_world/main.c7
-rw-r--r--packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py22
-rw-r--r--packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py76
-rw-r--r--packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py3
-rw-r--r--packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m2
-rw-r--r--packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile7
-rw-r--r--packages/Python/lldbsuite/test/python_api/watchpoint/.categories1
-rw-r--r--packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py2
-rw-r--r--packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py2
-rw-r--r--packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py9
-rw-r--r--packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py2
-rw-r--r--packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py2
-rw-r--r--packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py4
21 files changed, 196 insertions, 39 deletions
diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
index 4739df000853a..5c0c7bbd766ac 100644
--- a/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
+++ b/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
@@ -73,6 +73,17 @@ class APIDefaultConstructorTestCase(TestBase):
@add_test_categories(['pyapi'])
@no_debug_info_test
+ def test_SBBreakpointName(self):
+ obj = lldb.SBBreakpointName()
+ if self.TraceOn():
+ print(obj)
+ self.assertFalse(obj)
+ # Do fuzz testing on the invalid obj, it should not crash lldb.
+ import sb_breakpointname
+ sb_breakpointname.fuzz_obj(obj)
+
+ @add_test_categories(['pyapi'])
+ @no_debug_info_test
def test_SBBroadcaster(self):
obj = lldb.SBBroadcaster()
if self.TraceOn():
@@ -255,6 +266,17 @@ class APIDefaultConstructorTestCase(TestBase):
@add_test_categories(['pyapi'])
@no_debug_info_test
+ def test_SBProcessInfo(self):
+ obj = lldb.SBProcessInfo()
+ if self.TraceOn():
+ print(obj)
+ self.assertFalse(obj)
+ # Do fuzz testing on the invalid obj, it should not crash lldb.
+ import sb_process_info
+ sb_process_info.fuzz_obj(obj)
+
+ @add_test_categories(['pyapi'])
+ @no_debug_info_test
def test_SBSection(self):
obj = lldb.SBSection()
if self.TraceOn():
diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py
new file mode 100644
index 0000000000000..56016c05c3131
--- /dev/null
+++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py
@@ -0,0 +1,42 @@
+"""
+Fuzz tests an object after the default construction to make sure it does not crash lldb.
+"""
+
+import sys
+import lldb
+
+
+def fuzz_obj(obj):
+ obj.IsValid()
+ obj.GetName()
+ obj.SetEnabled(True)
+ obj.IsEnabled()
+ obj.SetOneShot(True)
+ obj.IsOneShot()
+ obj.SetIgnoreCount(1)
+ obj.GetIgnoreCount()
+ obj.SetCondition("1 == 2")
+ obj.GetCondition()
+ obj.SetAutoContinue(False)
+ obj.GetAutoContinue()
+ obj.SetThreadID(0x1234)
+ obj.GetThreadID()
+ obj.SetThreadIndex(10)
+ obj.GetThreadIndex()
+ obj.SetThreadName("AThread")
+ obj.GetThreadName()
+ obj.SetQueueName("AQueue")
+ obj.GetQueueName()
+ obj.SetScriptCallbackFunction("AFunction")
+ commands = lldb.SBStringList()
+ obj.SetCommandLineCommands(commands)
+ obj.GetCommandLineCommands(commands)
+ obj.SetScriptCallbackBody("Insert Python Code here")
+ obj.GetAllowList()
+ obj.SetAllowList(False)
+ obj.GetAllowDelete()
+ obj.SetAllowDelete(False)
+ obj.GetAllowDisable()
+ obj.SetAllowDisable(False)
+ stream = lldb.SBStream()
+ obj.GetDescription(stream)
diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py
index 77e45c861e8d2..ac0f9a8aeb940 100644
--- a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py
+++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py
@@ -30,6 +30,10 @@ def fuzz_obj(obj):
obj.FindTargetWithFileAndArch("a.out", "arm")
obj.GetNumTargets()
obj.GetSelectedTarget()
+ obj.GetNumPlatforms()
+ obj.GetPlatformAtIndex(0xffffffff)
+ obj.GetNumAvailablePlatforms()
+ obj.GetAvailablePlatformInfoAtIndex(0xffffffff)
obj.GetSourceManager()
obj.SetSelectedTarget(lldb.SBTarget())
obj.SetCurrentPlatformSDKRoot("tmp/sdk-root")
diff --git a/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py
new file mode 100644
index 0000000000000..020ad4e106643
--- /dev/null
+++ b/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py
@@ -0,0 +1,22 @@
+"""
+Fuzz tests an object after the default construction to make sure it does not crash lldb.
+"""
+
+import sys
+import lldb
+
+
+def fuzz_obj(obj):
+ obj.IsValid()
+ obj.GetName()
+ obj.GetExecutableFile()
+ obj.GetProcessID()
+ obj.GetUserID()
+ obj.GetGroupID()
+ obj.UserIDIsValid()
+ obj.GroupIDIsValid()
+ obj.GetEffectiveUserID()
+ obj.GetEffectiveGroupID()
+ obj.EffectiveUserIDIsValid()
+ obj.EffectiveGroupIDIsValid()
+ obj.GetParentProcessID()
diff --git a/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm b/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm
index f7383a5a14dea..9d4630dc7c4ca 100644
--- a/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm
+++ b/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/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py b/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
new file mode 100644
index 0000000000000..e69de29bb2d1d
--- /dev/null
+++ b/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
diff --git a/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py b/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
index 06ca772073acb..a2d2cf12cdca0 100644
--- a/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
+++ b/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/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py b/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
index 44dd4a618507e..fb4e54aa0bc56 100644
--- a/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
+++ b/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/packages/Python/lldbsuite/test/python_api/hello_world/main.c b/packages/Python/lldbsuite/test/python_api/hello_world/main.c
index 1b942d0db159b..001e9c01e6e5e 100644
--- a/packages/Python/lldbsuite/test/python_api/hello_world/main.c
+++ b/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/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py b/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
index 49a78888ad89f..a19cc5c375f5a 100644
--- a/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
+++ b/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/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py b/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py
index 1009536b3709b..065c707448909 100644
--- a/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py
+++ b/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py
@@ -325,3 +325,79 @@ class ProcessAPITestCase(TestBase):
num = process.GetNumSupportedHardwareWatchpoints(error)
if self.TraceOn() and error.Success():
print("Number of supported hardware watchpoints: %d" % num)
+
+ @add_test_categories(['pyapi'])
+ @no_debug_info_test
+ def test_get_process_info(self):
+ """Test SBProcess::GetProcessInfo() API with a locally launched process."""
+ self.build()
+ exe = os.path.join(os.getcwd(), "a.out")
+ self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+ target = self.dbg.CreateTarget(exe)
+ self.assertTrue(target, VALID_TARGET)
+
+ # Launch the process and stop at the entry point.
+ launch_info = lldb.SBLaunchInfo(None)
+ launch_info.SetWorkingDirectory(self.get_process_working_directory())
+ launch_flags = launch_info.GetLaunchFlags()
+ launch_flags |= lldb.eLaunchFlagStopAtEntry
+ launch_info.SetLaunchFlags(launch_flags)
+ error = lldb.SBError()
+ process = target.Launch(launch_info, error)
+
+ if not error.Success():
+ self.fail("Failed to launch process")
+
+ # Verify basic process info can be retrieved successfully
+ process_info = process.GetProcessInfo()
+ self.assertTrue(process_info.IsValid())
+ file_spec = process_info.GetExecutableFile()
+ self.assertTrue(file_spec.IsValid())
+ process_name = process_info.GetName()
+ self.assertIsNotNone(process_name, "Process has a name")
+ self.assertGreater(len(process_name), 0, "Process name isn't blank")
+ self.assertEqual(file_spec.GetFilename(), "a.out")
+ self.assertNotEqual(
+ process_info.GetProcessID(), lldb.LLDB_INVALID_PROCESS_ID,
+ "Process ID is valid")
+
+ # Additional process info varies by platform, so just check that
+ # whatever info was retrieved is consistent and nothing blows up.
+ if process_info.UserIDIsValid():
+ self.assertNotEqual(
+ process_info.GetUserID(), lldb.UINT32_MAX,
+ "Process user ID is valid")
+ else:
+ self.assertEqual(
+ process_info.GetUserID(), lldb.UINT32_MAX,
+ "Process user ID is invalid")
+
+ if process_info.GroupIDIsValid():
+ self.assertNotEqual(
+ process_info.GetGroupID(), lldb.UINT32_MAX,
+ "Process group ID is valid")
+ else:
+ self.assertEqual(
+ process_info.GetGroupID(), lldb.UINT32_MAX,
+ "Process group ID is invalid")
+
+ if process_info.EffectiveUserIDIsValid():
+ self.assertNotEqual(
+ process_info.GetEffectiveUserID(), lldb.UINT32_MAX,
+ "Process effective user ID is valid")
+ else:
+ self.assertEqual(
+ process_info.GetEffectiveUserID(), lldb.UINT32_MAX,
+ "Process effective user ID is invalid")
+
+ if process_info.EffectiveGroupIDIsValid():
+ self.assertNotEqual(
+ process_info.GetEffectiveGroupID(), lldb.UINT32_MAX,
+ "Process effective group ID is valid")
+ else:
+ self.assertEqual(
+ process_info.GetEffectiveGroupID(), lldb.UINT32_MAX,
+ "Process effective group ID is invalid")
+
+ process_info.GetParentProcessID()
diff --git a/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py b/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
index 5314930ff99eb..71f77b3688096 100644
--- a/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
+++ b/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/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m b/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m
index 599d36107f417..6ac70d1d06b76 100644
--- a/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m
+++ b/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/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile b/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile
index e5c7b91507381..ddffdcfb62d61 100644
--- a/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile
+++ b/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile
@@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp
# Clean renamed executable on 'make clean'
clean: OBJECTS+=no_synth
-# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
-# targets. Other targets do not, which causes this test to fail.
-# This flag enables FullDebugInfo for all targets.
-ifneq (,$(findstring clang,$(CC)))
- CFLAGS_EXTRAS += -fno-limit-debug-info
-endif
-
include $(LEVEL)/Makefile.rules
diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/.categories b/packages/Python/lldbsuite/test/python_api/watchpoint/.categories
new file mode 100644
index 0000000000000..50c1613cda72f
--- /dev/null
+++ b/packages/Python/lldbsuite/test/python_api/watchpoint/.categories
@@ -0,0 +1 @@
+watchpoint
diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py b/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py
index bc925ee693d49..cef8a0c4e81f9 100644
--- a/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py
+++ b/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py
@@ -28,8 +28,6 @@ class SetWatchpointAPITestCase(TestBase):
self.source, '// Set break point at this line.')
@add_test_categories(['pyapi'])
- # Watchpoints not supported
- @expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(
oslist=["windows"],
bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
index 2685ef819cad0..0d1ef809d2919 100644
--- a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
+++ b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
@@ -28,8 +28,6 @@ class WatchpointIgnoreCountTestCase(TestBase):
self.source, '// Set break point at this line.')
@add_test_categories(['pyapi'])
- # Watchpoints not supported
- @expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(
oslist=["windows"],
bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py
index 33f1be77ad573..ca5fca3acf9a0 100644
--- a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py
+++ b/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)
@@ -29,8 +33,6 @@ class WatchpointIteratorTestCase(TestBase):
self.source, '// Set break point at this line.')
@add_test_categories(['pyapi'])
- # Watchpoints not supported
- @expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(
oslist=["windows"],
bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
@@ -99,7 +101,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))
diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
index 03c94b6d04fa5..4b0216d7a6025 100644
--- a/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
+++ b/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
@@ -33,8 +33,6 @@ class WatchpointConditionAPITestCase(TestBase):
self.exe_name = self.testMethodName
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
- # Watchpoints not supported
- @expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(
oslist=["linux"],
archs=["aarch64"],
diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
index 1cbaf5f46f616..e6bc9c0a76544 100644
--- a/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
+++ b/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
@@ -31,8 +31,6 @@ class SetWatchlocationAPITestCase(TestBase):
self.violating_func = "do_bad_thing_with_location"
@add_test_categories(['pyapi'])
- # Watchpoints not supported
- @expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(
oslist=["windows"],
bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
index 6078901c66976..80595060b42d0 100644
--- a/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
+++ b/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
@@ -30,8 +30,6 @@ class TargetWatchAddressAPITestCase(TestBase):
self.violating_func = "do_bad_thing_with_location"
@add_test_categories(['pyapi'])
- # Watchpoints not supported
- @expectedFailureAndroid(archs=['arm', 'aarch64'])
@expectedFailureAll(
oslist=["windows"],
bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
@@ -107,8 +105,6 @@ class TargetWatchAddressAPITestCase(TestBase):
# This finishes our test.
@add_test_categories(['pyapi'])
- # Watchpoints not supported
- @expectedFailureAndroid(archs=['arm', 'aarch64'])
# No size constraint on MIPS for watches
@skipIf(archs=['mips', 'mipsel', 'mips64', 'mips64el'])
@skipIf(archs=['s390x']) # Likewise on SystemZ