[Lldb-commits] [PATCH] D120607: [lldb/test] Re-enable TestEvents.py on Darwin and fix crashes
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 4 13:35:44 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2a29c3f72e8d: [lldb/test] Re-enable TestEvents.py on Darwin and fix crashes (authored by mib).
Herald added a project: All.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120607/new/
https://reviews.llvm.org/D120607
Files:
lldb/test/API/python_api/event/TestEvents.py
Index: lldb/test/API/python_api/event/TestEvents.py
===================================================================
--- lldb/test/API/python_api/event/TestEvents.py
+++ lldb/test/API/python_api/event/TestEvents.py
@@ -13,7 +13,6 @@
@skipIfLinux # llvm.org/pr25924, sometimes generating SIGSEGV
- at skipIfDarwin
class EventAPITestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -171,9 +170,9 @@
# Let's only try at most 3 times to retrieve any kind of event.
while not count > 3:
if listener.WaitForEvent(5, event):
- self.trace("Got a valid event:", event)
- self.trace("Event data flavor:", event.GetDataFlavor())
- self.trace("Event type:", lldbutil.state_type_to_str(event.GetType()))
+ self.context.trace("Got a valid event:", event)
+ self.context.trace("Event data flavor:", event.GetDataFlavor())
+ self.context.trace("Event type:", lldbutil.state_type_to_str(event.GetType()))
listener.Clear()
return
count = count + 1
@@ -187,6 +186,7 @@
# Let's start the listening thread to retrieve the event.
my_thread = MyListeningThread()
+ my_thread.context = self
my_thread.start()
# Wait until the 'MyListeningThread' terminates.
@@ -256,7 +256,7 @@
class MyListeningThread(threading.Thread):
def run(self):
- self.trace("Running MyListeningThread:", self)
+ self.context.trace("Running MyListeningThread:", self)
# Regular expression pattern for the event description.
pattern = re.compile("data = {.*, state = (.*)}$")
@@ -266,7 +266,7 @@
while True:
if listener.WaitForEvent(5, event):
desc = lldbutil.get_description(event)
- self.trace("Event description:", desc)
+ self.context.trace("Event description:", desc)
match = pattern.search(desc)
if not match:
break
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120607.413130.patch
Type: text/x-patch
Size: 2286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220304/1dafa4c1/attachment.bin>
More information about the lldb-commits
mailing list