[Lldb-commits] [PATCH] D19983: Fix TestEvents.py on OS X

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Thu May 5 09:35:27 PDT 2016


tfiala updated this revision to Diff 56303.
tfiala added a comment.

Added full diff context to diff.


http://reviews.llvm.org/D19983

Files:
  packages/Python/lldbsuite/test/python_api/event/TestEvents.py

Index: packages/Python/lldbsuite/test/python_api/event/TestEvents.py
===================================================================
--- packages/Python/lldbsuite/test/python_api/event/TestEvents.py
+++ packages/Python/lldbsuite/test/python_api/event/TestEvents.py
@@ -13,7 +13,6 @@
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
- at skipIfDarwin  # llvm.org/pr25924, sometimes generating SIGSEGV
 @skipIfLinux   # llvm.org/pr25924, sometimes generating SIGSEGV
 class EventAPITestCase(TestBase):
 
@@ -86,6 +85,7 @@
                         if traceOn:
                             print("timeout occurred waiting for event...")
                     count = count + 1
+                listener.Clear()
                 return
 
         # Let's start the listening thread to retrieve the events.
@@ -103,6 +103,8 @@
         # Wait until the 'MyListeningThread' terminates.
         my_thread.join()
 
+        # Shouldn't we be testing against some kind of expectation here?
+
     @add_test_categories(['pyapi'])
     @expectedFlakeyLinux("llvm.org/pr23730") # Flaky, fails ~1/100 cases
     def test_wait_for_event(self):
@@ -155,10 +157,11 @@
                         #print("Got a valid event:", event)
                         #print("Event data flavor:", event.GetDataFlavor())
                         #print("Event type:", lldbutil.state_type_to_str(event.GetType()))
+                        listener.Clear()
                         return
                     count = count + 1
                     print("Timeout: listener.WaitForEvent")
-
+                listener.Clear()
                 return
 
         # Use Python API to kill the process.  The listening thread should be
@@ -266,7 +269,7 @@
                     count = count + 1
                     if count > 6:
                         break
-
+                listener.Clear()
                 return
 
         # Use Python API to continue the process.  The listening thread should be


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19983.56303.patch
Type: text/x-patch
Size: 1996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160505/b6b0b82c/attachment.bin>


More information about the lldb-commits mailing list