[compiler-rt] r349263 - Enable test/msan/pthread_getname_np.cc for NetBSD
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 15 02:42:14 PST 2018
Author: kamil
Date: Sat Dec 15 02:42:14 2018
New Revision: 349263
URL: http://llvm.org/viewvc/llvm-project?rev=349263&view=rev
Log:
Enable test/msan/pthread_getname_np.cc for NetBSD
Modified:
compiler-rt/trunk/test/msan/pthread_getname_np.cc
Modified: compiler-rt/trunk/test/msan/pthread_getname_np.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/pthread_getname_np.cc?rev=349263&r1=349262&r2=349263&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/pthread_getname_np.cc (original)
+++ compiler-rt/trunk/test/msan/pthread_getname_np.cc Sat Dec 15 02:42:14 2018
@@ -1,7 +1,7 @@
// RUN: %clangxx_msan -std=c++11 -O0 %s -o %t && %run %t
// The main goal is getting the pthread name back and
// FreeBSD based do not support this feature
-// UNSUPPORTED: android, netbsd, freebsd
+// UNSUPPORTED: android, freebsd
// Regression test for a deadlock in pthread_getattr_np
@@ -32,7 +32,11 @@ int main(void) {
assert(!res);
const char *kMyThreadName = "my-thread-name";
+#if defined(__NetBSD__)
+ res = pthread_setname_np(t, "%s", (void *)kMyThreadName);
+#else
res = pthread_setname_np(t, kMyThreadName);
+#endif
assert(!res);
char buf[100];
More information about the llvm-commits
mailing list