diff options
author | Jason Molenda <jmolenda@apple.com> | 2016-09-13 23:29:46 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2016-09-13 23:29:46 +0000 |
commit | d82e1063f965006c55299bcb5b1284a02d77b65c (patch) | |
tree | f88c3a5df8797f76c170bfaa7c1795bb320f088a /lldb/packages/Python/lldbsuite/test/macosx | |
parent | b459eb352986891bb0ec4c146954c2627ed6fc8e (diff) | |
download | bcm5719-llvm-d82e1063f965006c55299bcb5b1284a02d77b65c.tar.gz bcm5719-llvm-d82e1063f965006c55299bcb5b1284a02d77b65c.zip |
TestQueues could error out because the one second sleep main.c was
using to enqueue all the jobs wasn't enough time on a slow/overloaded
system. Instead use a global to indicate when all the work has
been enqueued, let's see if this makes the CIs work more reliably.
llvm-svn: 281418
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/macosx')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py | 1 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/macosx/queues/main.c | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py b/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py index 51a1f8de4ca..2d86f860d52 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py +++ b/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py @@ -17,7 +17,6 @@ class TestQueues(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin - @expectedFailureAll(bugnumber="rdar://28237450") @add_test_categories(['pyapi']) def test_with_python_api(self): """Test queues inspection SB APIs.""" diff --git a/lldb/packages/Python/lldbsuite/test/macosx/queues/main.c b/lldb/packages/Python/lldbsuite/test/macosx/queues/main.c index fa6a3e570ae..715a3f3af52 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/queues/main.c +++ b/lldb/packages/Python/lldbsuite/test/macosx/queues/main.c @@ -3,6 +3,8 @@ #include <dispatch/dispatch.h> #include <pthread.h> +int finished_enqueueing_work = 0; + void doing_the_work_1(void *in) { @@ -45,6 +47,7 @@ submit_work_2(void *in) dispatch_async_f (*work_performer_2, NULL, doing_the_work_2); dispatch_async_f (*work_performer_2, NULL, doing_the_work_2); } + finished_enqueueing_work = 1; } @@ -73,6 +76,7 @@ stopper () sleep (1); } + int main () { dispatch_queue_t work_submittor_1 = dispatch_queue_create ("com.apple.work_submittor_1", DISPATCH_QUEUE_SERIAL); @@ -126,8 +130,8 @@ int main () }); - sleep (1); + while (finished_enqueueing_work == 0) + sleep (1); stopper (); } - |