diff options
| author | Felipe de Azevedo Piovezan <fpiovezan@apple.com> | 2025-02-06 15:59:43 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-06 15:59:43 -0800 |
| commit | b8002933e92f89600521be420376ec111ad367f1 (patch) | |
| tree | d37e8d82049788a5b104b4aa6dbabe219d25c249 /lldb/test/API/functionalities/plugins/python_os_plugin | |
| parent | a0d86b23c0c81d0900c9d361035f02989e2647a4 (diff) | |
[lldb] Add missing return statements in ThreadMemory (#126128)
These prevented ThreadMemory from correctly returning the
Name/Queue/Info of the backing thread.
Note about testing: this test only finds regressions if the system sets
a name or queue for the backing thread. While this may not be true
everywhere, it still provides coverage in some systems, e.g. in Apple
platforms.
Diffstat (limited to 'lldb/test/API/functionalities/plugins/python_os_plugin')
| -rw-r--r-- | lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py b/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py index 3ad7539018d5..fe78edd98f4d 100644 --- a/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py +++ b/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py @@ -160,6 +160,8 @@ class PluginPythonOSPlugin(TestBase): ) self.assertTrue(process, PROCESS_IS_VALID) + core_thread_zero = process.GetThreadAtIndex(0) + # Make sure there are no OS plug-in created thread when we first stop # at our breakpoint in main thread = process.GetThreadByID(0x111111111) @@ -183,6 +185,10 @@ class PluginPythonOSPlugin(TestBase): thread.IsValid(), "Make sure there is a thread 0x111111111 after we load the python OS plug-in", ) + # This OS plugin does not set thread names / queue names, so it should + # inherit the core thread's name. + self.assertEqual(core_thread_zero.GetName(), thread.GetName()) + self.assertEqual(core_thread_zero.GetQueueName(), thread.GetQueueName()) frame = thread.GetFrameAtIndex(0) self.assertTrue( |
