diff --git a/compiler-rt/test/tsan/Linux/user_malloc.cc b/compiler-rt/test/tsan/Linux/user_malloc.cc index c671bfcdd17a8de7edfb2c869c2aaed307aba11f..9c3ce681d748561b59db54d7c7f622c6a63b7ed9 100644 --- a/compiler-rt/test/tsan/Linux/user_malloc.cc +++ b/compiler-rt/test/tsan/Linux/user_malloc.cc @@ -8,7 +8,7 @@ extern "C" void __interceptor_free(void *p); extern "C" void *malloc(unsigned long size) { static int first = 0; if (__sync_lock_test_and_set(&first, 1) == 0) - printf("user malloc\n"); + fprintf(stderr, "user malloc\n"); return __interceptor_malloc(size); } diff --git a/compiler-rt/test/tsan/aligned_vs_unaligned_race.cc b/compiler-rt/test/tsan/aligned_vs_unaligned_race.cc index 5c1189f34a4bc25498a9fb8a274354340abf7328..61f73ba699f080578c5fbd97cecba8f90e14c13e 100644 --- a/compiler-rt/test/tsan/aligned_vs_unaligned_race.cc +++ b/compiler-rt/test/tsan/aligned_vs_unaligned_race.cc @@ -28,7 +28,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("Pass\n"); + fprintf(stderr, "Pass\n"); // CHECK: ThreadSanitizer: data race // CHECK: Pass return 0; diff --git a/compiler-rt/test/tsan/benign_race.cc b/compiler-rt/test/tsan/benign_race.cc index 2f72fe1860d07f045a6f1b735b0ee147130be2ce..90722aa93157c30031ee5d175fbfe49c86878b9a 100644 --- a/compiler-rt/test/tsan/benign_race.cc +++ b/compiler-rt/test/tsan/benign_race.cc @@ -33,7 +33,7 @@ int main() { Global = 43; WTFGlobal = 143; pthread_join(t, 0); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/blacklist.cc b/compiler-rt/test/tsan/blacklist.cc index d6ca383cb758cc44456b2bbcf5633bba573c2c93..c1bcca60d50539651a056ebdcfadc44204f85e8a 100644 --- a/compiler-rt/test/tsan/blacklist.cc +++ b/compiler-rt/test/tsan/blacklist.cc @@ -23,7 +23,7 @@ int main() { pthread_create(&t[1], NULL, Blacklisted_Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } diff --git a/compiler-rt/test/tsan/blacklist2.cc b/compiler-rt/test/tsan/blacklist2.cc index 629b58821bfe1f7074a7600bf4554a329f310a20..bf6c4eb75b654301784269b759ab418f57bd7ca2 100644 --- a/compiler-rt/test/tsan/blacklist2.cc +++ b/compiler-rt/test/tsan/blacklist2.cc @@ -44,6 +44,6 @@ int main() { pthread_create(&t[1], NULL, Blacklisted_Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } diff --git a/compiler-rt/test/tsan/dl_iterate_phdr.cc b/compiler-rt/test/tsan/dl_iterate_phdr.cc index b9ce615f82fe520fb00a85419246d80b478453ae..3c9821bf458a44bffe2cbcfed9fe1cd0bf645566 100644 --- a/compiler-rt/test/tsan/dl_iterate_phdr.cc +++ b/compiler-rt/test/tsan/dl_iterate_phdr.cc @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) { dlclose(lib); } pthread_join(th, 0); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return 0; } diff --git a/compiler-rt/test/tsan/fd_close_norace.cc b/compiler-rt/test/tsan/fd_close_norace.cc index 1b52c20f990c49b02e615c9f016445da218f5fce..7d9d491f1dcc0f72d5cafbe9c1e4a543729f77da 100644 --- a/compiler-rt/test/tsan/fd_close_norace.cc +++ b/compiler-rt/test/tsan/fd_close_norace.cc @@ -25,7 +25,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/fd_close_norace2.cc b/compiler-rt/test/tsan/fd_close_norace2.cc index bf94fd5512b3995ad9676c19625f77b41d793c60..382ae5f34a83b7169a8f9bf7ebc29d68833d417f 100644 --- a/compiler-rt/test/tsan/fd_close_norace2.cc +++ b/compiler-rt/test/tsan/fd_close_norace2.cc @@ -23,7 +23,7 @@ int main() { while (write(pipes[1], &t, 1) != 1) { } pthread_join(t, 0); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/fd_dup_norace.cc b/compiler-rt/test/tsan/fd_dup_norace.cc index 5045325b22b53cf80e459216d287f1541f9aac7f..e5995175bc0fdbf4e58e85cac9674f14fd1b83d3 100644 --- a/compiler-rt/test/tsan/fd_dup_norace.cc +++ b/compiler-rt/test/tsan/fd_dup_norace.cc @@ -28,7 +28,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/fd_dup_norace2.cc b/compiler-rt/test/tsan/fd_dup_norace2.cc index 662c686f33a85f36e874260231d4a490f84ead23..31aaed9d356c95e9295965813f1a9fae038b1a66 100644 --- a/compiler-rt/test/tsan/fd_dup_norace2.cc +++ b/compiler-rt/test/tsan/fd_dup_norace2.cc @@ -53,7 +53,7 @@ int main() { exit(printf("close failed\n")); if (close(fd2) == -1) exit(printf("close failed\n")); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/fd_dup_race.cc b/compiler-rt/test/tsan/fd_dup_race.cc index a1aee5500753044d238ba3ce871ca51ccea31ce1..d665eebff987bfbd1286c77eac22c993b311cc95 100644 --- a/compiler-rt/test/tsan/fd_dup_race.cc +++ b/compiler-rt/test/tsan/fd_dup_race.cc @@ -27,7 +27,7 @@ int main() { exit(printf("dup2 failed\n")); barrier_wait(&barrier); pthread_join(th, 0); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); } // CHECK: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/fd_pipe_norace.cc b/compiler-rt/test/tsan/fd_pipe_norace.cc index b434703d782aed657c2e88c37a391921a5a08f8f..01c4490c6c89afa2d5afd6ce64e566add1e45e71 100644 --- a/compiler-rt/test/tsan/fd_pipe_norace.cc +++ b/compiler-rt/test/tsan/fd_pipe_norace.cc @@ -27,7 +27,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/fd_socket_connect_norace.cc b/compiler-rt/test/tsan/fd_socket_connect_norace.cc index ab2a950f17d65b89368c2aab7f645401cba27ffe..b9fb4340ad785b0c28cfa2537a95a934890ecacb 100644 --- a/compiler-rt/test/tsan/fd_socket_connect_norace.cc +++ b/compiler-rt/test/tsan/fd_socket_connect_norace.cc @@ -38,7 +38,7 @@ int main() { pthread_join(t, 0); close(c); close(s); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/fd_socket_norace.cc b/compiler-rt/test/tsan/fd_socket_norace.cc index 0f41c43573541f6b3c37861cad2a76d76067f6a1..07b0cb356b8c5a2f3b2738a051557b5500efa8d7 100644 --- a/compiler-rt/test/tsan/fd_socket_norace.cc +++ b/compiler-rt/test/tsan/fd_socket_norace.cc @@ -45,7 +45,7 @@ int main() { close(c); close(s); pthread_join(t, 0); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/fd_socketpair_norace.cc b/compiler-rt/test/tsan/fd_socketpair_norace.cc index a455d44a396559780d68db766d74799437379b15..bee030dd3249a3876b797d79abacd0620d213683 100644 --- a/compiler-rt/test/tsan/fd_socketpair_norace.cc +++ b/compiler-rt/test/tsan/fd_socketpair_norace.cc @@ -31,7 +31,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/ignore_race.cc b/compiler-rt/test/tsan/ignore_race.cc index cc33b66b27d4fa9e50c02e97a04414aeb4bc83eb..e410006ddc72658d8ce08c40657abe2c3dbc7df6 100644 --- a/compiler-rt/test/tsan/ignore_race.cc +++ b/compiler-rt/test/tsan/ignore_race.cc @@ -25,7 +25,7 @@ int main() { barrier_wait(&barrier); Global = 43; pthread_join(t, 0); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/inlined_memcpy_race.cc b/compiler-rt/test/tsan/inlined_memcpy_race.cc index 720f2bfcac8c00abef78c1adcca781a49e174663..4d5de88520bc2becd07e08dad592af036a6a8ea4 100644 --- a/compiler-rt/test/tsan/inlined_memcpy_race.cc +++ b/compiler-rt/test/tsan/inlined_memcpy_race.cc @@ -24,7 +24,7 @@ int main() { pthread_create(&t[1], NULL, MemSetThread, x); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } diff --git a/compiler-rt/test/tsan/inlined_memcpy_race2.cc b/compiler-rt/test/tsan/inlined_memcpy_race2.cc index 37414ba5d3db4cb6b6d37a5730848e5fadb0a546..0f1afd2f2a5e0b8d44e60ad12839117c84bed975 100644 --- a/compiler-rt/test/tsan/inlined_memcpy_race2.cc +++ b/compiler-rt/test/tsan/inlined_memcpy_race2.cc @@ -25,7 +25,7 @@ int main() { pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } diff --git a/compiler-rt/test/tsan/interface_atomic_test.c b/compiler-rt/test/tsan/interface_atomic_test.c index 18d860ea02e2ba0e509e0dfdcfb6878c757c6e30..99f6074df418134c215a01a1747e5253d1f78f73 100644 --- a/compiler-rt/test/tsan/interface_atomic_test.c +++ b/compiler-rt/test/tsan/interface_atomic_test.c @@ -9,7 +9,7 @@ int main() { int res = __tsan_atomic32_load(&a, __tsan_memory_order_acquire); if (res == 100) { // CHECK: PASS - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } return 1; diff --git a/compiler-rt/test/tsan/java_alloc.cc b/compiler-rt/test/tsan/java_alloc.cc index 4a606f7940d31a796f594d2a50484486706fe22e..94919a4373a47e6d98cae8960268dd20f4e3a680 100644 --- a/compiler-rt/test/tsan/java_alloc.cc +++ b/compiler-rt/test/tsan/java_alloc.cc @@ -26,10 +26,10 @@ int main() { stress(jheap); pthread_join(th, 0); if (__tsan_java_fini() != 0) { - printf("FAILED\n"); + fprintf(stderr, "FAILED\n"); return 1; } - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return 0; } diff --git a/compiler-rt/test/tsan/java_heap_init.cc b/compiler-rt/test/tsan/java_heap_init.cc index bb7357c25b4294b47d5e4c50c93b1991fb0048fd..47ec5dbad28ee98eccc85746fd58b977fac13a64 100644 --- a/compiler-rt/test/tsan/java_heap_init.cc +++ b/compiler-rt/test/tsan/java_heap_init.cc @@ -20,7 +20,7 @@ int main() { return printf("second mmap failed with %d\n", errno); __tsan_java_init(jheap, kHeapSize); __tsan_java_move(jheap + 16, jheap, 16); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return __tsan_java_fini(); } diff --git a/compiler-rt/test/tsan/java_lock_move.cc b/compiler-rt/test/tsan/java_lock_move.cc index fe5491dc2aa06f4558ac5b8f35e09f97229611f1..66599f8b7081bdebaa944b7f9c11844ef02eda4d 100644 --- a/compiler-rt/test/tsan/java_lock_move.cc +++ b/compiler-rt/test/tsan/java_lock_move.cc @@ -35,7 +35,7 @@ int main() { barrier_wait(&barrier); pthread_join(th, 0); __tsan_java_free(varaddr2, kBlockSize); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return __tsan_java_fini(); } diff --git a/compiler-rt/test/tsan/java_lock_rec.cc b/compiler-rt/test/tsan/java_lock_rec.cc index f0bf40196e9f8e2a65257146f8fcce6287dfde5e..aa8de97a148bebc6bd65d138d9ad47cad20cd78d 100644 --- a/compiler-rt/test/tsan/java_lock_rec.cc +++ b/compiler-rt/test/tsan/java_lock_rec.cc @@ -10,14 +10,14 @@ void *Thread(void *p) { *(int*)varaddr = 42; int rec = __tsan_java_mutex_unlock_rec(lockaddr); if (rec != 2) { - printf("FAILED 0 rec=%d\n", rec); + fprintf(stderr, "FAILED 0 rec=%d\n", rec); exit(1); } barrier_wait(&barrier); barrier_wait(&barrier); __tsan_java_mutex_lock_rec(lockaddr, rec); if (*(int*)varaddr != 43) { - printf("FAILED 3 var=%d\n", *(int*)varaddr); + fprintf(stderr, "FAILED 3 var=%d\n", *(int*)varaddr); exit(1); } __tsan_java_mutex_unlock(lockaddr); @@ -40,7 +40,7 @@ int main() { barrier_wait(&barrier); __tsan_java_mutex_lock(lockaddr); if (*(int*)varaddr != 42) { - printf("FAILED 1 var=%d\n", *(int*)varaddr); + fprintf(stderr, "FAILED 1 var=%d\n", *(int*)varaddr); exit(1); } *(int*)varaddr = 43; @@ -48,7 +48,7 @@ int main() { barrier_wait(&barrier); pthread_join(th, 0); __tsan_java_free(jheap, kBlockSize); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return __tsan_java_fini(); } diff --git a/compiler-rt/test/tsan/java_lock_rec_race.cc b/compiler-rt/test/tsan/java_lock_rec_race.cc index 3da8ad076990815fbb477f288ad39fabce3ea815..b6c7ccb7e23b8cd666286b286b3a074e1bcc462b 100644 --- a/compiler-rt/test/tsan/java_lock_rec_race.cc +++ b/compiler-rt/test/tsan/java_lock_rec_race.cc @@ -10,7 +10,7 @@ void *Thread(void *p) { __tsan_java_mutex_lock(lockaddr); int rec = __tsan_java_mutex_unlock_rec(lockaddr); if (rec != 3) { - printf("FAILED 0 rec=%d\n", rec); + fprintf(stderr, "FAILED 0 rec=%d\n", rec); exit(1); } *(int*)varaddr = 42; @@ -42,7 +42,7 @@ int main() { barrier_wait(&barrier); pthread_join(th, 0); __tsan_java_free(jheap, kBlockSize); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return __tsan_java_fini(); } diff --git a/compiler-rt/test/tsan/java_move_overlap.cc b/compiler-rt/test/tsan/java_move_overlap.cc index 7ed98ef1a2102f61a79d93a6a67793a5b65eeb6e..bf8d1e1550fc398808514dc734946e30b05bbe3c 100644 --- a/compiler-rt/test/tsan/java_move_overlap.cc +++ b/compiler-rt/test/tsan/java_move_overlap.cc @@ -66,7 +66,7 @@ int main(int argc, char **argv) { barrier_wait(&barrier); pthread_join(th, 0); __tsan_java_free(varaddr1_new, kBlockSize); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return __tsan_java_fini(); } diff --git a/compiler-rt/test/tsan/java_move_overlap_race.cc b/compiler-rt/test/tsan/java_move_overlap_race.cc index 874b90b2634133ed28983b185fa1c5f5b5ed7872..2887fd3fee22d8dfb79b00d57b194f5a9294f203 100644 --- a/compiler-rt/test/tsan/java_move_overlap_race.cc +++ b/compiler-rt/test/tsan/java_move_overlap_race.cc @@ -46,7 +46,7 @@ int main(int argc, char **argv) { barrier_wait(&barrier); pthread_join(th, 0); __tsan_java_free(varaddr1_new, kBlockSize); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return __tsan_java_fini(); } diff --git a/compiler-rt/test/tsan/java_rwlock.cc b/compiler-rt/test/tsan/java_rwlock.cc index a4cc92a136355f67d8376b68d88df1a6ec79c741..aa77273a41b574c43b09f7e12e1e7a8649f1700b 100644 --- a/compiler-rt/test/tsan/java_rwlock.cc +++ b/compiler-rt/test/tsan/java_rwlock.cc @@ -29,7 +29,7 @@ int main() { barrier_wait(&barrier); pthread_join(th, 0); __tsan_java_free(jheap, kBlockSize); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return __tsan_java_fini(); } diff --git a/compiler-rt/test/tsan/longjmp.cc b/compiler-rt/test/tsan/longjmp.cc index d642067391fd63a3d5e3283206f5b7d9dc1ad64d..61d285c11bf2cd649e7e083760ecae44eba95bb0 100644 --- a/compiler-rt/test/tsan/longjmp.cc +++ b/compiler-rt/test/tsan/longjmp.cc @@ -14,11 +14,11 @@ int foo(jmp_buf env) { int main() { jmp_buf env; if (setjmp(env) == 42) { - printf("JUMPED\n"); + fprintf(stderr, "JUMPED\n"); return 0; } foo(env); - printf("FAILED\n"); + fprintf(stderr, "FAILED\n"); return 0; } diff --git a/compiler-rt/test/tsan/longjmp2.cc b/compiler-rt/test/tsan/longjmp2.cc index eee423dc5fbe0be9118e392612eddd318d6fdfa2..f77c94b237fca689845fad95ede8e18fa2f5fa12 100644 --- a/compiler-rt/test/tsan/longjmp2.cc +++ b/compiler-rt/test/tsan/longjmp2.cc @@ -16,11 +16,11 @@ int main() { sigjmp_buf env; printf("env=%p\n", env); if (sigsetjmp(env, 1) == 42) { - printf("JUMPED\n"); + printf(stderr, "JUMPED\n"); return 0; } foo(env); - printf("FAILED\n"); + fprintf(stderr, "FAILED\n"); return 0; } diff --git a/compiler-rt/test/tsan/longjmp3.cc b/compiler-rt/test/tsan/longjmp3.cc index 79965c4193d319f8ab09bbb2a94d3e37da4703e5..f4f9c2b311eae50c8e092a366865c724216752ea 100644 --- a/compiler-rt/test/tsan/longjmp3.cc +++ b/compiler-rt/test/tsan/longjmp3.cc @@ -34,7 +34,7 @@ void mymain() { return; } foo(env); - printf("FAILED\n"); + fprintf(stderr, "FAILED\n"); } int main() { diff --git a/compiler-rt/test/tsan/longjmp4.cc b/compiler-rt/test/tsan/longjmp4.cc index c8583997331e24b09229dffb0cfead60b6bba680..2b15435a194b46fa58add240e2b1d31bd82a1f5a 100644 --- a/compiler-rt/test/tsan/longjmp4.cc +++ b/compiler-rt/test/tsan/longjmp4.cc @@ -37,7 +37,7 @@ void mymain() { return; } foo(env); - printf("FAILED\n"); + fprintf(stderr, "FAILED\n"); } int main() { diff --git a/compiler-rt/test/tsan/malloc_overflow.cc b/compiler-rt/test/tsan/malloc_overflow.cc index b2f9b0f57798a36b027103cfbc4fd57a4d102d37..3db412978d04076487e29b2fe439a43c2399c9e8 100644 --- a/compiler-rt/test/tsan/malloc_overflow.cc +++ b/compiler-rt/test/tsan/malloc_overflow.cc @@ -6,17 +6,17 @@ int main() { void *p = malloc((size_t)-1); if (p != 0) - printf("FAIL malloc(-1) = %p\n", p); + fprintf(stderr, "FAIL malloc(-1) = %p\n", p); p = malloc((size_t)-1 / 2); if (p != 0) - printf("FAIL malloc(-1/2) = %p\n", p); + fprintf(stderr, "FAIL malloc(-1/2) = %p\n", p); p = calloc((size_t)-1, (size_t)-1); if (p != 0) - printf("FAIL calloc(-1, -1) = %p\n", p); + fprintf(stderr, "FAIL calloc(-1, -1) = %p\n", p); p = calloc((size_t)-1 / 2, (size_t)-1 / 2); if (p != 0) - printf("FAIL calloc(-1/2, -1/2) = %p\n", p); - printf("OK\n"); + fprintf(stderr, "FAIL calloc(-1/2, -1/2) = %p\n", p); + fprintf(stderr, "OK\n"); } // CHECK-NOT: FAIL diff --git a/compiler-rt/test/tsan/race_on_speculative_load.cc b/compiler-rt/test/tsan/race_on_speculative_load.cc index dd40daeb5c196bcce3f36409f97b7c8c5ab53172..89b162116a81b7370f343304287963d8a445d379 100644 --- a/compiler-rt/test/tsan/race_on_speculative_load.cc +++ b/compiler-rt/test/tsan/race_on_speculative_load.cc @@ -24,7 +24,7 @@ int main() { g = 1; barrier_wait(&barrier); pthread_join(t, 0); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); // CHECK-NOT: ThreadSanitizer: data race // CHECK: PASS } diff --git a/compiler-rt/test/tsan/static_init1.cc b/compiler-rt/test/tsan/static_init1.cc index 3e5fb14ba44b9b690d1fb4d7c60af65fc2465d34..3e6e4f9dfec193a7c79ef656f4801053e06c5461 100644 --- a/compiler-rt/test/tsan/static_init1.cc +++ b/compiler-rt/test/tsan/static_init1.cc @@ -21,7 +21,7 @@ int main() { pthread_create(&t[1], 0, Thread, 0); pthread_join(t[0], 0); pthread_join(t[1], 0); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/static_init2.cc b/compiler-rt/test/tsan/static_init2.cc index 667aed1343dcb86a16762764ec00de2e83c73df4..ca2300ae6801e4c62dc3841c87ba2992233f211f 100644 --- a/compiler-rt/test/tsan/static_init2.cc +++ b/compiler-rt/test/tsan/static_init2.cc @@ -27,7 +27,7 @@ int main() { pthread_create(&t[1], 0, Thread, 0); pthread_join(t[0], 0); pthread_join(t[1], 0); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/static_init4.cc b/compiler-rt/test/tsan/static_init4.cc index 85835a2520f762af12cf535f9df5bd4cccc4e75e..c8da78364c5ca08e09e7c450a2f1ad23d514eeaf 100644 --- a/compiler-rt/test/tsan/static_init4.cc +++ b/compiler-rt/test/tsan/static_init4.cc @@ -31,7 +31,7 @@ int main() { pthread_create(&t[1], 0, Thread1, 0); pthread_join(t[0], 0); pthread_join(t[1], 0); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/static_init5.cc b/compiler-rt/test/tsan/static_init5.cc index 961e3a3b63291d4bf4650336508bca039bfd817b..b334981e85b007d8bff61d73c77870f294a334c9 100644 --- a/compiler-rt/test/tsan/static_init5.cc +++ b/compiler-rt/test/tsan/static_init5.cc @@ -36,7 +36,7 @@ int main() { pthread_create(&t[1], 0, Thread1, 0); pthread_join(t[0], 0); pthread_join(t[1], 0); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/static_init6.cc b/compiler-rt/test/tsan/static_init6.cc index 0bfefe345bdcb77cf0887a5c5d01bca783d3a199..fd22e0a02e6a5b07f828fdab632557cbb1cf4a09 100644 --- a/compiler-rt/test/tsan/static_init6.cc +++ b/compiler-rt/test/tsan/static_init6.cc @@ -36,7 +36,7 @@ int main() { pthread_create(&t[1], 0, Thread1, 0); pthread_join(t[0], 0); pthread_join(t[1], 0); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/sunrpc.cc b/compiler-rt/test/tsan/sunrpc.cc index 579816d6409836819035726b5fe54abc2686f0e9..5cfb5344ec1044ca17f17cdaae50c88af8353d94 100644 --- a/compiler-rt/test/tsan/sunrpc.cc +++ b/compiler-rt/test/tsan/sunrpc.cc @@ -19,7 +19,7 @@ int main(int argc, char *argv[]) { pthread_create(&th[1], 0, thr, 0); pthread_join(th[0], 0); pthread_join(th[1], 0); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); // CHECK: DONE return 0; } diff --git a/compiler-rt/test/tsan/suppressions_global.cc b/compiler-rt/test/tsan/suppressions_global.cc index 8928162cfb8a1a69aad121e20f85dd5f5329460e..282d261c19efd7224d28906668305c05743cdcf7 100644 --- a/compiler-rt/test/tsan/suppressions_global.cc +++ b/compiler-rt/test/tsan/suppressions_global.cc @@ -20,7 +20,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("OK\n"); + fprintf(stderr, "OK\n"); return 0; } diff --git a/compiler-rt/test/tsan/suppressions_race.cc b/compiler-rt/test/tsan/suppressions_race.cc index 7a88434db820505ee4b95f4985b9b8e983793560..d0aeeda95e36e3c08e4c3b34f94f0ee3bddf11d7 100644 --- a/compiler-rt/test/tsan/suppressions_race.cc +++ b/compiler-rt/test/tsan/suppressions_race.cc @@ -22,7 +22,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("OK\n"); + fprintf(stderr, "OK\n"); return 0; } diff --git a/compiler-rt/test/tsan/suppressions_race2.cc b/compiler-rt/test/tsan/suppressions_race2.cc index b6566a80178d193bc6375d68ad75c3db3f05d804..6f8ca736d8aecb8cd30c47563b43d8b3010c2d9a 100644 --- a/compiler-rt/test/tsan/suppressions_race2.cc +++ b/compiler-rt/test/tsan/suppressions_race2.cc @@ -22,7 +22,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("OK\n"); + fprintf(stderr, "OK\n"); return 0; } diff --git a/compiler-rt/test/tsan/thread_detach.c b/compiler-rt/test/tsan/thread_detach.c index 802d8ded0fad01cfcf8326a6119ec873cf4cc25b..2a95742b7cd86965836f36b8f6c4b972dc3cb8f3 100644 --- a/compiler-rt/test/tsan/thread_detach.c +++ b/compiler-rt/test/tsan/thread_detach.c @@ -12,7 +12,7 @@ int main() { pthread_create(&t, 0, Thread, 0); barrier_wait(&barrier); pthread_detach(t); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } diff --git a/compiler-rt/test/tsan/thread_detach2.c b/compiler-rt/test/tsan/thread_detach2.c index 8133980ba5a1aec5d5782f9dc8a85aa4b488e163..5ee94e9a967babe486bcfcc8e16f9b67744f67e0 100644 --- a/compiler-rt/test/tsan/thread_detach2.c +++ b/compiler-rt/test/tsan/thread_detach2.c @@ -20,7 +20,7 @@ int main() { pthread_create(&t, 0, Thread, 0); pthread_detach(t); barrier_wait(&barrier); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } diff --git a/compiler-rt/test/tsan/thread_leak.c b/compiler-rt/test/tsan/thread_leak.c index 9b850dd4b567b1d510deef6b4e6afcaffb5b7bbe..9b42b16b72a4b8dfd6709e49e3e6a0ce9ed818e9 100644 --- a/compiler-rt/test/tsan/thread_leak.c +++ b/compiler-rt/test/tsan/thread_leak.c @@ -10,7 +10,7 @@ int main() { pthread_t t; pthread_create(&t, 0, Thread, 0); pthread_join(t, 0); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } diff --git a/compiler-rt/test/tsan/thread_leak2.c b/compiler-rt/test/tsan/thread_leak2.c index fc2942b2a05d04c8b36da380a1783b5516f0493e..c3cac7a4928404fd9b856b91ae46525b8533bd3c 100644 --- a/compiler-rt/test/tsan/thread_leak2.c +++ b/compiler-rt/test/tsan/thread_leak2.c @@ -10,7 +10,7 @@ int main() { pthread_t t; pthread_create(&t, 0, Thread, 0); pthread_detach(t); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); return 0; } diff --git a/compiler-rt/test/tsan/thread_leak4.c b/compiler-rt/test/tsan/thread_leak4.c index 1ebca58871ac34cf083ed7d56c9242f640f929d6..1d0636f1a4c00d0b828be0ae259aba94617373fd 100644 --- a/compiler-rt/test/tsan/thread_leak4.c +++ b/compiler-rt/test/tsan/thread_leak4.c @@ -9,7 +9,7 @@ void *Thread(void *x) { int main() { pthread_t t; pthread_create(&t, 0, Thread, 0); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); return 0; } diff --git a/compiler-rt/test/tsan/tsan-vs-gvn.cc b/compiler-rt/test/tsan/tsan-vs-gvn.cc index 950f5d30d4da0f25e256314738579e421a6f5e08..efd81ef502fd2760804177afc34c4d342dc54f89 100644 --- a/compiler-rt/test/tsan/tsan-vs-gvn.cc +++ b/compiler-rt/test/tsan/tsan-vs-gvn.cc @@ -31,7 +31,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("PASS\n"); + fprintf(stderr, "PASS\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/unaligned_norace.cc b/compiler-rt/test/tsan/unaligned_norace.cc index 94df1cf74cc1d4e2705565f3b9cb57d86e98f6b5..7e360cf87042ba1ee06b4e59bcef955fc39b62d4 100644 --- a/compiler-rt/test/tsan/unaligned_norace.cc +++ b/compiler-rt/test/tsan/unaligned_norace.cc @@ -77,7 +77,7 @@ int main() { pthread_create(&th, 0, Thread, 0); Test(true); pthread_join(th, 0); - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: diff --git a/compiler-rt/test/tsan/vfork.cc b/compiler-rt/test/tsan/vfork.cc index 98a82623ee6513b22d533581f380c8b1ac688f78..fe83b2d20d80da48e04fffd3c41d48eb842d61f8 100644 --- a/compiler-rt/test/tsan/vfork.cc +++ b/compiler-rt/test/tsan/vfork.cc @@ -27,7 +27,7 @@ int main() { pipe(fds); int pid = vfork(); if (pid < 0) { - printf("FAIL to vfork\n"); + fprintf(stderr, "FAIL to vfork\n"); exit(1); } if (pid == 0) { // child @@ -44,7 +44,7 @@ int main() { pthread_create(&t[1], NULL, Thread2, NULL); pthread_join(t[0], NULL); pthread_join(t[1], NULL); - printf("DONE\n"); + fprintf(stderr, "DONE\n"); } // CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc b/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc index 7da581d80601bae620a3d3443856b258941bef89..3b1e08b1689bf311c490abcbc9b2dc916cc23981 100644 --- a/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc +++ b/compiler-rt/test/tsan/virtual_inheritance_compile_bug.cc @@ -10,6 +10,6 @@ struct DDD: CCC, BBB { DDD(); }; // NOLINT DDD::DDD() { } int main() { DDD d; - printf("OK\n"); + fprintf(stderr, "OK\n"); } // CHECK: OK