[PATCH] D60327: [TSan][libdispatch] Add RunLoop helper to ease porting tests

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 12:46:11 PDT 2019


kubamracek added a comment.

See the inline notes. Is there no better approach?



================
Comment at: compiler-rt/test/tsan/Darwin/gcd-blocks.mm:27
-  CFRunLoopRun();
-  fprintf(stderr, "done\n");
 }
----------------
Can we keep the print in main?


================
Comment at: compiler-rt/test/tsan/Darwin/runloop.h:22
+      fprintf(stderr, "Done.\n");
+      exit(0);
+    } else {
----------------
Can we somehow exit() from by returning from main instead? That would be much cleaner.


================
Comment at: compiler-rt/test/tsan/Darwin/runloop.h:24
+    } else {
+      dispatch_async(dispatch_get_main_queue(), exitBlock);
+    }
----------------
This keeps burning the CPU until we exit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60327





More information about the llvm-commits mailing list