diff --git a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py index 4831d48a0b5a9..0c215f082c5d3 100644 --- a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py +++ b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py @@ -41,6 +41,7 @@ def test_python_plugin_package(self): self.expect('script dir(ScriptedProcess)', substrs=["launch"]) + @skipUnlessDarwin def test_invalid_scripted_register_context(self): """Test that we can launch an lldb scripted process with an invalid Scripted Thread, with invalid register context.""" @@ -77,7 +78,7 @@ def cleanup(): self.assertIn("Failed to get scripted thread registers data.", log) - @skipIf(archs=no_match(['x86_64'])) + @skipIf(archs=no_match(['x86_64', 'arm64', 'arm64e'])) def test_scripted_process_and_scripted_thread(self): """Test that we can launch an lldb scripted process using the SBAPI, check its process ID, read string from memory, check scripted thread @@ -124,8 +125,10 @@ def cleanup(): break self.assertTrue(GPRs, "Invalid General Purpose Registers Set") - self.assertEqual(GPRs.GetNumChildren(), 21) + self.assertGreater(GPRs.GetNumChildren(), 0) for idx, reg in enumerate(GPRs, start=1): + if idx > 21: + break self.assertEqual(idx, int(reg.value, 16)) def create_stack_skinny_corefile(self, file): diff --git a/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py b/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py index d7f428d408457..67850cf57a73d 100644 --- a/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py +++ b/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py @@ -9,6 +9,7 @@ class DummyScriptedProcess(ScriptedProcess): def __init__(self, target: lldb.SBTarget, args : lldb.SBStructuredData): super().__init__(target, args) + self.threads[0] = DummyScriptedThread(self, None) def get_memory_region_containing_address(self, addr: int) -> lldb.SBMemoryRegionInfo: return None