[Lldb-commits] [lldb] [lldb-dap] Make TestDAP_Progress more resilient (again) (PR #134157)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 2 15:09:54 PDT 2025
================
@@ -12,17 +12,31 @@
class TestDAP_progress(lldbdap_testcase.DAPTestCaseBase):
+ MAX_ATTEMPS = 10
----------------
JDevlieghere wrote:
Yeah, that's a good point. Here's my understanding why how this works:
We have a packet read thread (`read_packet_thread`) which looks at incoming packets. Certain packets are recognized and added to lists (e.g. the `progress_events`) and they don't get added to the packets list, which means you can't wait on them:
```
elif event.startswith("progress"):
# Progress events come in as 'progressStart', 'progressUpdate',
# and 'progressEnd' events. Keep these around in case test
# cases want to verify them.
self.progress_events.append(packet)
# No need to add 'progress' event packets to our packets list.
return keepGoing
```
If we wanted to make this work with `wait_for_event`, we can remove the last two lines and that way, we'll block until the packet is received. I actually like that approach better. Let me update the PR.
https://github.com/llvm/llvm-project/pull/134157
More information about the lldb-commits
mailing list