aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/API')
-rw-r--r--lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/Makefile3
-rw-r--r--lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/TestDataFormatterInvalidAtomic.py45
-rw-r--r--lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/main.cpp23
-rw-r--r--lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py6
-rw-r--r--lldb/test/API/macosx/mte/TestDarwinMTE.py2
-rw-r--r--lldb/test/API/python_api/default-constructor/sb_filespec.py2
6 files changed, 74 insertions, 7 deletions
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/TestDataFormatterInvalidAtomic.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/TestDataFormatterInvalidAtomic.py
new file mode 100644
index 0000000..76b8e7b
--- /dev/null
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/TestDataFormatterInvalidAtomic.py
@@ -0,0 +1,45 @@
+"""
+Test formatting of `std::atomic`s not from any STL
+"""
+
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class InvalidAtomicDataFormatterTestCase(TestBase):
+ def test(self):
+ self.build()
+ lldbutil.run_to_source_breakpoint(
+ self, "Set break point at this line.", lldb.SBFileSpec("main.cpp")
+ )
+
+ self.expect_expr(
+ "a",
+ result_children=[
+ ValueCheck(name="foo", value="1"),
+ ValueCheck(name="bar", value="2"),
+ ],
+ )
+ self.expect_expr(
+ "b",
+ result_children=[
+ ValueCheck(name="foo", value="3"),
+ ValueCheck(name="bar", value="4"),
+ ],
+ )
+
+ self.expect_expr(
+ "c",
+ result_children=[
+ ValueCheck(name="foo", value="5"),
+ ValueCheck(name="bar", value="6"),
+ ],
+ )
+ self.expect_expr(
+ "d",
+ result_children=[
+ ValueCheck(name="foo", value="7"),
+ ValueCheck(name="bar", value="8"),
+ ],
+ )
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/main.cpp
new file mode 100644
index 0000000..7b4c51c
--- /dev/null
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic-simulators/invalid-atomic/main.cpp
@@ -0,0 +1,23 @@
+namespace std {
+template <typename T> struct atomic {
+ int foo;
+ int bar;
+};
+
+namespace __1 {
+template <typename T> struct atomic {
+ int foo;
+ int bar;
+};
+} // namespace __1
+} // namespace std
+
+int main() {
+ std::atomic<int> a{1, 2};
+ std::atomic<void> b{3, 4};
+
+ std::__1::atomic<int> c{5, 6};
+ std::__1::atomic<void> d{7, 8};
+
+ return 0; // Set break point at this line.
+}
diff --git a/lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py b/lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py
index 10cbd26..50ea173 100644
--- a/lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py
+++ b/lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py
@@ -12,7 +12,7 @@ from lldbsuite.test import lldbutil
class TestCortexMExceptionUnwind(TestBase):
NO_DEBUG_INFO_TESTCASE = True
- @skipIfRemote
+ @skipIfLLVMTargetMissing("ARM")
def test_no_fpu(self):
"""Test that we can backtrace correctly through an ARM Cortex-M Exception return stack"""
@@ -44,10 +44,6 @@ class TestCortexMExceptionUnwind(TestBase):
thread = process.GetThreadAtIndex(0)
self.assertTrue(thread.IsValid())
- # We have 4 named stack frames and two unnamed
- # frames above that. The topmost two stack frames
- # were not interesting for this test, so I didn't
- # create symbols for them.
self.assertEqual(thread.GetNumFrames(), 3)
stackframe_names = [
"exception_catcher",
diff --git a/lldb/test/API/macosx/mte/TestDarwinMTE.py b/lldb/test/API/macosx/mte/TestDarwinMTE.py
index ef858b1..489e24a 100644
--- a/lldb/test/API/macosx/mte/TestDarwinMTE.py
+++ b/lldb/test/API/macosx/mte/TestDarwinMTE.py
@@ -47,7 +47,7 @@ class TestDarwinMTE(TestBase):
self.expect("memory region ptr", substrs=["memory tagging: enabled"])
@skipUnlessFeature(cpu_feature.AArch64.MTE)
- def test_memory_read_with_tags(self):
+ def test_memory_read_show_tags(self):
self.build()
lldbutil.run_to_source_breakpoint(
self, "// before free", lldb.SBFileSpec("main.c"), exe_name=exe_name
diff --git a/lldb/test/API/python_api/default-constructor/sb_filespec.py b/lldb/test/API/python_api/default-constructor/sb_filespec.py
index 4ab5c49..5dd78b1 100644
--- a/lldb/test/API/python_api/default-constructor/sb_filespec.py
+++ b/lldb/test/API/python_api/default-constructor/sb_filespec.py
@@ -10,5 +10,5 @@ def fuzz_obj(obj):
obj.ResolveExecutableLocation()
obj.GetFilename()
obj.GetDirectory()
- obj.GetPath(None, 0)
+ obj.GetPath(1)
obj.GetDescription(lldb.SBStream())