[Lldb-commits] [lldb] r355706 - Add more logging to TestQueues.py

Frederic Riss via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 8 09:09:13 PST 2019


Author: friss
Date: Fri Mar  8 09:09:13 2019
New Revision: 355706

URL: http://llvm.org/viewvc/llvm-project?rev=355706&view=rev
Log:
Add more logging to TestQueues.py

The last round of logging taught us that when the test fails, lldb
is indeed aware of the thread it's failing to associate to a given
queue. Add more logging to try to figure out why the thread and the
queue do not appear related to the Queue APIs.

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=355706&r1=355705&r2=355706&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 09:09:13 2019
@@ -65,8 +65,8 @@ class TestQueues(TestBase):
             location = "\t".join([lldbutil.get_description(
                 x.GetFrameAtIndex(i)) for i in range(x.GetNumFrames())])
             desc.append(
-                "thread %d: %s at\n\t%s" %
-                (id, reason_str, location))
+                "thread %d: %s (queue id: %s) at\n\t%s" %
+                (id, reason_str, x.GetQueueID(), location))
         print('\n'.join(desc))
 
     def check_number_of_threads_owned_by_queue(self, queue, number_threads):
@@ -327,6 +327,8 @@ class TestQueues(TestBase):
         queue_performer_3 = lldb.SBQueue()
         for idx in range(0, process.GetNumQueues()):
             q = process.GetQueueAtIndex(idx)
+            if "LLDB_COMMAND_TRACE" in os.environ:
+                print("Queue  with id %s has name %s" % (q.GetQueueID(), q.GetName()))
             if q.GetName() == "com.apple.work_submittor_1":
                 queue_submittor_1 = q
             if q.GetName() == "com.apple.work_performer_1":




More information about the lldb-commits mailing list