[PATCH] D60476: [TSan][libdispatch] Change test to have two simultaneous timers

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 11:15:20 PDT 2019


yln created this revision.
Herald added subscribers: llvm-commits, Sanitizers, kubamracek.
Herald added projects: Sanitizers, LLVM.
yln added reviewers: kubamracek, dcoughlin, delcypher.

Change test semantics by waiting for both timer callbacks at the end
instead of serializing operations: start/wait timer 1 then 2.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D60476

Files:
  compiler-rt/test/tsan/Darwin/gcd-after.mm


Index: compiler-rt/test/tsan/Darwin/gcd-after.mm
===================================================================
--- compiler-rt/test/tsan/Darwin/gcd-after.mm
+++ compiler-rt/test/tsan/Darwin/gcd-after.mm
@@ -27,11 +27,11 @@
 
     dispatch_semaphore_signal(done);
   });
-  dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
 
   my_global2 = 10;
   dispatch_after_f(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_MSEC)), q, NULL, &callback);
 
+  dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
   dispatch_semaphore_wait(done, DISPATCH_TIME_FOREVER);
   fprintf(stderr, "done\n");
   return 0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60476.194367.patch
Type: text/x-patch
Size: 620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190409/919fdac2/attachment.bin>


More information about the llvm-commits mailing list