[PATCH] [Tsan] Fix the signal_recursive.cc test to pass on systems with high loads

Viktor Kutuzov vkutuzov at accesssoftek.com
Thu Dec 4 05:31:55 PST 2014


================
Comment at: test/tsan/signal_recursive.cc:67
@@ -66,3 +66,3 @@
   while ((result = sem_wait(&g_thread_suspend_ack_sem)) != 0) {
     if (result != EINTR) {
       fail("sem_wait failed");
----------------
My man pages (both the Linux and FreeBSD ones) for sem_wait() read that it returns (-1) on error so I believe it should be:
  if (errno != EINTR)

================
Comment at: test/tsan/signal_recursive.cc:79
@@ -78,3 +78,3 @@
   while ((result = sem_wait(&g_thread_suspend_ack_sem)) != 0) {
     if (result != EINTR) {
       fail("sem_wait failed");
----------------
Same here.
It doesn't affect passing the test on the buildbot, but though.

http://reviews.llvm.org/D6504






More information about the llvm-commits mailing list