[Lldb-commits] [PATCH] D122193: [lldb/test] Add events listener helper function to lldbtest

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 23 11:47:02 PDT 2022


labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/packages/Python/lldbsuite/test/lldbutil.py:1265
+
+def fetch_next_event(test, listener, broadcaster, timeout=1):
+    """Fetch one event from the listener and return it if it matches the provided broadcaster.
----------------
1 is definitely not a good default. If you can't/don't want to use zero, then I'd recommend at least 10 seconds.


================
Comment at: lldb/packages/Python/lldbsuite/test/lldbutil.py:1273
+        if event.BroadcasterMatchesRef(broadcaster):
+            return event
+
----------------
```
else:
  test.fail("got event '%s' from unexpected broadcaster '%s'%(event.GetDescription(), event.GetBroadcaster().GetName())
```
(or something along those line)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122193/new/

https://reviews.llvm.org/D122193



More information about the lldb-commits mailing list