[Lldb-commits] [PATCH] D56208: Add file-based synchronization to flaky test

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 2 23:47:30 PST 2019


labath added inline comments.


================
Comment at: lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py:132
             self.fail("Failed to stop at breakpoint 1.")
+        self.await_token(exe)
 
----------------
Will this actually help? It could be I'm missing something about how macos queues work, but it seems to me that at this point the process is already stopped, and so it has either managed to create the token files, or it hasn't. Waiting isn't going to make things better.

The way I'd synchronize these things is via barriers. I'd put one `pseudo_barrier_wait` in place of the `touch` calls, and then another just before the call to `stopper`. That way you guarantee that the queues have been initialized even before you hit the `stopper` breakpoint.

Note that using barriers will require porting this code to (obj)c++ (they use atomics), but that doesn't seem like it would alter the purpose of this test.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56208/new/

https://reviews.llvm.org/D56208





More information about the lldb-commits mailing list