Add more logging to TestQueues.py
authorFrederic Riss <friss@apple.com>
Fri, 8 Mar 2019 17:09:13 +0000 (17:09 +0000)
committerFrederic Riss <friss@apple.com>
Fri, 8 Mar 2019 17:09:13 +0000 (17:09 +0000)
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.

llvm-svn: 355706

lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py

index 50b4743..cfb30c4 100644 (file)
@@ -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":