[Lldb-commits] [PATCH] D149175: [lldb/test] Update lldbutil.fetch_next_event to match broadcaster class

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 25 11:19:13 PDT 2023


bulbazord added inline comments.


================
Comment at: lldb/packages/Python/lldbsuite/test/lldbutil.py:1206-1207
+def fetch_next_event(test, listener, broadcaster, match_class=False, timeout=10):
     """Fetch one event from the listener and return it if it matches the provided broadcaster.
     Fails otherwise."""
 
----------------
Maybe update the docstring to reflect this new parameter? Something like `If match_class is true, the provided broadcaster will be matched by class rather than instance`?


================
Comment at: lldb/packages/Python/lldbsuite/test/lldbutil.py:1219-1220
 
+        stream = lldb.SBStream()
+        event.GetDescription(stream)
         test.fail("received event '%s' from unexpected broadcaster '%s'." %
----------------
I'm not sure why you added this part? Is there something not great about calling `SBEvent::GetDescription` directly?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149175



More information about the lldb-commits mailing list