Author: friss Date: Fri Mar 8 17:34:44 2019 New Revision: 355766 URL: http://llvm.org/viewvc/llvm-project?rev=355766&view=rev Log: Actually implement the TestQueues.py workaround
The code commited in r355764 didn't do what I want as I typed GetThreadID instead of GetQueueID. This commit contains a (hopefully) better version of the workaround. Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py?rev=355766&r1=355765&r2=355766&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py Fri Mar 8 17:34:44 2019 @@ -337,6 +337,10 @@ class TestQueues(TestBase): queue_performer_2 = q if q.GetName() == "com.apple.work_performer_3": queue_performer_3 = q + if q.GetName() == "com.apple.main-thread": + if q.GetNumThreads() == 0: + print("Cannot get thread <=> queue associations") + return self.assertTrue( queue_submittor_1.IsValid() and queue_performer_1.IsValid() and queue_performer_2.IsValid() and queue_performer_3.IsValid(), @@ -357,11 +361,6 @@ class TestQueues(TestBase): queue_performer_2, 1, 9999) self.check_running_and_pending_items_on_queue(queue_performer_3, 4, 0) - for th in process.threads: - if th.GetThreadID() == lldb.LLDB_INVALID_QUEUE_ID: - print("Cannot get thread <=> queue associations") - return - self.check_number_of_threads_owned_by_queue(queue_submittor_1, 1) self.check_number_of_threads_owned_by_queue(queue_performer_1, 1) self.check_number_of_threads_owned_by_queue(queue_performer_2, 1) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits