[Lldb-commits] [lldb] [lldb-dap] Improving consistency of tests by removing concurrency. (PR #165496)

via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 28 17:44:33 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py lldb/test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py lldb/test/API/tools/lldb-dap/module-event/TestDAP_module_event.py lldb/test/API/tools/lldb-dap/module/TestDAP_module.py lldb/test/API/tools/lldb-dap/restart/TestDAP_restart_console.py lldb/test/API/tools/lldb-dap/send-event/TestDAP_sendEvent.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py	2025-10-29 00:40:07.000000 +0000
+++ packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py	2025-10-29 00:44:02.189409 +0000
@@ -472,11 +472,11 @@
 
         Returns the seq number of the request.
         """
         packet["seq"] = self.sequence
         self.sequence += 1
-        
+
         # Encode our command dictionary as a JSON string
         json_str = json.dumps(packet, separators=(",", ":"))
 
         if self.trace_file:
             self.trace_file.write("%s to adapter:\n%s\n" % (time.time(), json_str))
--- test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py	2025-10-29 00:40:07.000000 +0000
+++ test/API/tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py	2025-10-29 00:44:02.348351 +0000
@@ -87,10 +87,14 @@
         self.continue_to_breakpoint(main_bp_id)
         self.continue_to_exit()
 
         bp_events = [e for e in self.dap_server.events if e["event"] == "breakpoint"]
 
-        main_bp_events = [e for e in bp_events if e['body']['breakpoint']['id'] == main_bp_id]
-        foo_bp_events = [e for e in bp_events if e['body']['breakpoint']['id'] == foo_bp_id]
+        main_bp_events = [
+            e for e in bp_events if e["body"]["breakpoint"]["id"] == main_bp_id
+        ]
+        foo_bp_events = [
+            e for e in bp_events if e["body"]["breakpoint"]["id"] == foo_bp_id
+        ]
 
         self.assertTrue(main_bp_events)
         self.assertTrue(foo_bp_events)
--- test/API/tools/lldb-dap/restart/TestDAP_restart_console.py	2025-10-29 00:40:07.000000 +0000
+++ test/API/tools/lldb-dap/restart/TestDAP_restart_console.py	2025-10-29 00:44:02.545525 +0000
@@ -100,11 +100,11 @@
         stopped_threads = list(self.dap_server.thread_stop_reasons.values())
         # We should be stopped at the entry point.
         self.assertEqual(
             len(stopped_threads), 1, "Expected the main thread to be stopped on entry."
         )
-        self.assertEqual(stopped_threads[0]['reason'], 'entry')
+        self.assertEqual(stopped_threads[0]["reason"], "entry")
 
         # Then, if we continue, we should hit the breakpoint at main.
         self.dap_server.request_continue()
         self.verify_breakpoint_hit([bp_main])
 
@@ -114,11 +114,11 @@
         stopped_threads = list(self.dap_server.thread_stop_reasons.values())
         # We should be stopped at the entry point.
         self.assertEqual(
             len(stopped_threads), 1, "Expected the main thread to be stopped on entry."
         )
-        self.assertEqual(stopped_threads[0]['reason'], 'entry')
+        self.assertEqual(stopped_threads[0]["reason"], "entry")
 
         # continue to main
         self.dap_server.request_continue()
         self.verify_breakpoint_hit([bp_main])
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/165496


More information about the lldb-commits mailing list