[PATCH] [Msan] Make the pthread_getattr_np_deadlock.cc test Linux-specific

Viktor Kutuzov vkutuzov at accesssoftek.com
Mon May 11 07:56:18 PDT 2015


Updated.


http://reviews.llvm.org/D9553

Files:
  test/msan/Linux/pthread_getattr_np_deadlock.cc
  test/msan/pthread_getattr_np_deadlock.cc

Index: test/msan/pthread_getattr_np_deadlock.cc
===================================================================
--- test/msan/pthread_getattr_np_deadlock.cc
+++ test/msan/pthread_getattr_np_deadlock.cc
@@ -1,22 +0,0 @@
-// RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && %run %t
-
-// Regression test for a deadlock in pthread_getattr_np
-
-#include <assert.h>
-#include <pthread.h>
-
-void *ThreadFn(void *) {
-  pthread_attr_t attr;
-  int res = pthread_getattr_np(pthread_self(), &attr);
-  assert(!res);
-  return 0;
-}
-
-int main(void) {
-  pthread_t t;
-  int res = pthread_create(&t, 0, ThreadFn, 0);
-  assert(!res);
-  res = pthread_join(t, 0);
-  assert(!res);
-  return 0;
-}
Index: test/msan/Linux/pthread_getattr_np_deadlock.cc
===================================================================
--- test/msan/Linux/pthread_getattr_np_deadlock.cc
+++ test/msan/Linux/pthread_getattr_np_deadlock.cc
@@ -0,0 +1,22 @@
+// RUN: %clangxx_msan -fsanitize-memory-track-origins -O0 %s -o %t && %run %t
+
+// Regression test for a deadlock in pthread_getattr_np
+
+#include <assert.h>
+#include <pthread.h>
+
+void *ThreadFn(void *) {
+  pthread_attr_t attr;
+  int res = pthread_getattr_np(pthread_self(), &attr);
+  assert(!res);
+  return 0;
+}
+
+int main(void) {
+  pthread_t t;
+  int res = pthread_create(&t, 0, ThreadFn, 0);
+  assert(!res);
+  res = pthread_join(t, 0);
+  assert(!res);
+  return 0;
+}

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9553.25472.patch
Type: text/x-patch
Size: 1440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150511/da6a121a/attachment.bin>


More information about the llvm-commits mailing list