[compiler-rt] r244833 - Combine helper file into main test file with ifdefs
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 16:24:41 PDT 2015
Author: rnk
Date: Wed Aug 12 18:24:41 2015
New Revision: 244833
URL: http://llvm.org/viewvc/llvm-project?rev=244833&view=rev
Log:
Combine helper file into main test file with ifdefs
Keeping tests isolated to a single file is nice, and it was suggested in
post-commit review for r244827.
Removed:
compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-pthread-create-extra.cc
Modified:
compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc
Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-pthread-create-extra.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-pthread-create-extra.cc?rev=244832&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-pthread-create-extra.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-pthread-create-extra.cc (removed)
@@ -1,2 +0,0 @@
-void *bar(void *input, bool sleep_before_init);
-void *glob2 = bar((void*)0x2345, true);
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc?rev=244833&r1=244832&r2=244833&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc Wed Aug 12 18:24:41 2015
@@ -1,9 +1,13 @@
// Check that init-order checking is properly disabled if pthread_create is
// called.
-// RUN: %clangxx_asan %s %p/../Helpers/init-order-pthread-create-extra.cc -pthread -o %t
+// RUN: %clangxx_asan -c -DCONFIG1 %s -o %t1.o
+// RUN: %clangxx_asan -c %s -o %t2.o
+// RUN: %clangxx_asan -pthread %t1.o %t2.o -o %t
// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:strict_init_order=true %run %t
+#ifdef CONFIG1
+
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
@@ -41,3 +45,10 @@ int main() {
printf("%p %p\n", glob, glob2);
return 0;
}
+
+#else // CONFIG1
+
+void *bar(void *input, bool sleep_before_init);
+void *glob2 = bar((void*)0x2345, true);
+
+#endif
More information about the llvm-commits
mailing list