2 include $(top_srcdir)/Makefile.tool-tests.am
4 dist_noinst_SCRIPTS = \
5 compare_error_count_with \
6 filter_annotate_barrier_xml \
8 filter_stderr_and_thread_no \
9 filter_stderr_solaris \
10 filter_thread_name_xml \
12 supported_libpthread \
17 filter_error_summary \
19 filter_stderr_and_thread_no_and_offset \
21 filter_xml_and_thread_no
24 tsan_thread_wrappers_pthread.h \
25 unified_annotations.h \
29 annotate_barrier.stderr.exp \
30 annotate_barrier.vgtest \
31 annotate_barrier_xml.stderr.exp \
32 annotate_barrier_xml.vgtest \
33 annotate_hb_err.stderr.exp \
34 annotate_hb_err.vgtest \
35 annotate_hb_race.stderr.exp \
36 annotate_hb_race.vgtest \
37 annotate_hbefore.stderr.exp \
38 annotate_hbefore.vgtest \
39 annotate_order_1.stderr.exp \
40 annotate_order_1.vgtest \
41 annotate_order_2.stderr.exp \
42 annotate_order_2.vgtest \
43 annotate_order_3.stderr.exp \
44 annotate_order_3.vgtest \
45 annotate_publish_hg.stderr.exp \
46 annotate_publish_hg.vgtest \
47 annotate_sem.stderr.exp \
49 annotate_smart_pointer.stderr.exp \
50 annotate_smart_pointer.vgtest \
51 annotate_smart_pointer2.stderr.exp \
52 annotate_smart_pointer2.stderr.exp-darwin \
53 annotate_smart_pointer2.vgtest \
54 annotate_spinlock.stderr.exp \
55 annotate_spinlock.vgtest \
56 annotate_rwlock.stderr.exp \
57 annotate_rwlock.vgtest \
58 annotate_rwlock_hg.stderr.exp \
59 annotate_rwlock_hg.vgtest \
60 annotate_ignore_read.stderr.exp \
61 annotate_ignore_read.vgtest \
62 annotate_ignore_rw.stderr.exp \
63 annotate_ignore_rw.vgtest \
64 annotate_ignore_rw2.stderr.exp \
65 annotate_ignore_rw2.stderr.exp-solaris \
66 annotate_ignore_rw2.vgtest \
67 annotate_ignore_write.stderr.exp \
68 annotate_ignore_write.stderr.exp-solaris \
69 annotate_ignore_write.vgtest \
70 annotate_ignore_write2.stderr.exp \
71 annotate_ignore_write2.stderr.exp-solaris \
72 annotate_ignore_write2.vgtest \
73 annotate_trace_memory.stderr.exp-arm \
74 annotate_trace_memory.stderr.exp-32bit \
75 annotate_trace_memory.stderr.exp-32bit-clang \
76 annotate_trace_memory.stderr.exp-64bit \
77 annotate_trace_memory.stderr.exp-mips32 \
78 annotate_trace_memory.vgtest \
79 annotate_trace_memory_xml.stderr.exp-arm \
80 annotate_trace_memory_xml.stderr.exp-32bit \
81 annotate_trace_memory_xml.stderr.exp-32bit-clang \
82 annotate_trace_memory_xml.stderr.exp-64bit \
83 annotate_trace_memory_xml.stderr.exp-mips32 \
84 annotate_trace_memory_xml.vgtest \
85 annotate_sem.stderr.exp \
87 annotate_static.stderr.exp \
88 annotate_static.vgtest \
89 atomic_var.stderr.exp \
92 bug322621.stderr.exp \
94 bar_bad.stderr.exp-no-barrier \
95 bar_bad.stderr.exp-nohang \
96 bar_bad.stderr.exp-solaris \
97 bar_bad.stderr.exp-freebsd \
99 bar_bad_xml.stderr.exp \
100 bar_bad_xml.stderr.exp-no-barrier \
101 bar_bad_xml.stderr.exp-nohang \
102 bar_bad_xml.stderr.exp-solaris \
103 bar_bad_xml.stderr.exp-freebsd \
105 bar_trivial.stderr.exp \
106 bar_trivial.stdout.exp \
108 boost_thread.stderr.exp \
109 boost_thread.vgtest \
110 bug-235681.stderr.exp \
112 circular_buffer.stderr.exp \
113 circular_buffer.vgtest \
114 concurrent_close.stderr.exp \
115 concurrent_close.vgtest \
118 custom_alloc.stderr.exp \
119 custom_alloc.vgtest \
120 custom_alloc_fiw.stderr.exp \
121 custom_alloc_fiw.vgtest \
125 fork-serial.stderr.exp \
127 fork-parallel.stderr.exp \
128 fork-parallel.vgtest \
130 fp_race.stderr.exp-mips32-be \
131 fp_race.stderr.exp-mips32-le \
133 fp_race2.stderr.exp \
135 fp_race_xml.stderr.exp \
136 fp_race_xml.stderr.exp-mips32-be \
137 fp_race_xml.stderr.exp-mips32-le \
138 fp_race_xml.stderr.exp-solaris \
140 free_is_write.stderr.exp \
141 free_is_write.vgtest \
142 free_is_write2.stderr.exp \
143 free_is_write2.vgtest \
144 hg01_all_ok.stderr.exp \
146 hg02_deadlock.stderr.exp \
147 hg02_deadlock.vgtest \
148 hg03_inherit.stderr.exp \
149 hg03_inherit.vgtest \
150 hg04_race.stderr.exp \
152 hg05_race2.stderr.exp \
153 hg05_race2.stderr.exp-powerpc \
155 hg06_readshared.stderr.exp \
156 hg06_readshared.vgtest \
157 hold_lock_1.stderr.exp \
159 hold_lock_2.stderr.exp \
161 getaddrinfo.stderr.exp \
163 linuxthreads_det.stderr.exp \
164 linuxthreads_det.stderr.exp-linuxthreads \
165 linuxthreads_det.stdout.exp \
166 linuxthreads_det.stdout.exp-linuxthreads \
167 linuxthreads_det.vgtest \
168 local_static.stderr.exp \
169 local_static.vgtest \
173 memory_allocation.stderr.exp \
174 memory_allocation.vgtest \
175 monitor_example.stderr.exp \
176 monitor_example.vgtest \
177 new_delete.stderr.exp \
179 omp_matinv.stderr.exp \
180 omp_matinv.stdout.exp \
182 omp_matinv_racy.stderr.exp \
183 omp_matinv_racy.stdout.exp \
184 omp_matinv_racy.vgtest \
185 omp_prime_racy.stderr.exp \
186 omp_prime_racy.vgtest \
187 omp_printf.stderr.exp \
189 pth_barrier.stderr.exp \
191 pth_barrier2.stderr.exp \
192 pth_barrier2.vgtest \
193 pth_barrier3.stderr.exp \
194 pth_barrier3.vgtest \
195 pth_barrier_race.stderr.exp \
196 pth_barrier_race.vgtest \
197 pth_barrier_reinit.stderr.exp \
198 pth_barrier_reinit.vgtest \
199 pth_barrier_thr_cr.stderr.exp \
200 pth_barrier_thr_cr.vgtest \
201 pth_barrier_thr_cr.supp \
202 pth_broadcast.stderr.exp \
203 pth_broadcast.vgtest \
204 pth_cancel_locked.stderr.exp \
205 pth_cancel_locked.stderr.exp-darwin \
206 pth_cancel_locked.vgtest \
207 pth_cleanup_handler.stderr.exp \
208 pth_cleanup_handler.vgtest \
209 pth_cond_destroy_busy.stderr.exp \
210 pth_cond_destroy_busy.stderr.exp-solaris \
211 pth_cond_destroy_busy.vgtest \
212 pth_cond_race.stderr.exp \
213 pth_cond_race.vgtest \
214 pth_cond_race2.stderr.exp \
215 pth_cond_race2.vgtest \
216 pth_cond_race3.stderr.exp \
217 pth_cond_race3.vgtest \
218 pth_create_chain.stderr.exp \
219 pth_create_chain.vgtest \
220 pth_create_glibc_2_0.stderr.exp \
221 pth_create_glibc_2_0.vgtest \
222 pth_detached.stderr.exp \
223 pth_detached.stdout.exp \
224 pth_detached.vgtest \
225 pth_detached2.stderr.exp \
226 pth_detached2.stdout.exp \
227 pth_detached2.vgtest \
228 pth_detached3.stderr.exp1 \
229 pth_detached3.stderr.exp2 \
230 pth_detached3.stderr.exp-freebsd \
231 pth_detached3.vgtest \
232 pth_detached_sem.stderr.exp \
233 pth_detached_sem.stdout.exp \
234 pth_detached_sem.vgtest \
235 pth_inconsistent_cond_wait.stderr.exp1 \
236 pth_inconsistent_cond_wait.stderr.exp2 \
237 pth_inconsistent_cond_wait.vgtest \
238 pth_mutex_reinit.stderr.exp \
239 pth_mutex_reinit.vgtest \
240 pth_mutex_signal.stderr.exp \
241 pth_mutex_signal.vgtest \
242 pth_once.stderr.exp \
244 pth_process_shared_mutex.stderr.exp \
245 pth_process_shared_mutex.vgtest \
246 pth_spinlock.stderr.exp \
247 pth_spinlock.vgtest \
248 pth_uninitialized_cond.stderr.exp \
249 pth_uninitialized_cond.vgtest \
250 read_and_free_race.stderr.exp \
251 read_and_free_race.vgtest \
252 recursive_mutex.stderr.exp-linux \
253 recursive_mutex.stderr.exp-darwin \
254 recursive_mutex.stderr.exp-solaris \
255 recursive_mutex.stderr.exp-freebsd \
256 recursive_mutex.vgtest \
257 rwlock_race.stderr.exp \
258 rwlock_race.stderr.exp2 \
260 rwlock_test.stderr.exp \
262 rwlock_type_checking.stderr.exp \
263 rwlock_type_checking.vgtest \
264 sem_as_mutex.stderr.exp \
265 sem_as_mutex.stderr.exp-mips32-be \
266 sem_as_mutex.stderr.exp-mips32-le \
267 sem_as_mutex.vgtest \
268 sem_as_mutex2.stderr.exp \
269 sem_as_mutex2.vgtest \
270 sem_as_mutex3.stderr.exp \
271 sem_as_mutex3.stderr.exp-mips32-be \
272 sem_as_mutex3.stderr.exp-mips32-le \
273 sem_as_mutex3.vgtest \
274 sem_clockwait_np.stderr.exp \
275 sem_clockwait_np.stdout.exp \
276 sem_clockwait_np.vgtest \
277 sem_open.stderr.exp \
278 sem_open.stderr.exp-mips32-be \
279 sem_open.stderr.exp-mips32-le \
281 sem_open2.stderr.exp \
283 sem_open3.stderr.exp \
284 sem_open3.stderr.exp-mips32-be \
285 sem_open3.stderr.exp-mips32-le \
287 sem_open_traced.stderr.exp \
288 sem_open_traced.vgtest \
289 sem_wait.stderr.exp \
291 shared_timed_mutex.stderr.exp \
292 shared_timed_mutex.vgtest \
293 swapcontext.stderr.exp \
297 sigaltstack.stderr.exp \
299 std_atomic.stderr.exp \
301 std_list.stderr.exp \
303 std_mutex.stderr.exp \
305 std_string.stderr.exp \
307 std_thread.stderr.exp \
309 std_thread2.stderr.exp \
312 str_tester.stderr.exp \
314 tc01_simple_race.stderr.exp \
315 tc01_simple_race.vgtest \
316 tc02_simple_tls.stderr.exp \
317 tc02_simple_tls.vgtest \
318 tc03_re_excl.stderr.exp \
319 tc03_re_excl.vgtest \
320 tc04_free_lock.stderr.exp-x86 \
321 tc04_free_lock.stderr.exp-ppc \
322 tc04_free_lock.stderr.exp-s390 \
323 tc04_free_lock.vgtest \
324 tc05_simple_race.stderr.exp \
325 tc05_simple_race.vgtest \
326 tc06_two_races.stderr.exp \
327 tc06_two_races.vgtest \
328 tc07_hbl1.stderr.exp \
329 tc07_hbl1.stdout.exp \
331 tc08_hbl2.stderr.exp \
332 tc08_hbl2.stdout.exp \
334 tc09_bad_unlock.stderr.exp-x86 \
335 tc09_bad_unlock.stderr.exp-ppc \
336 tc09_bad_unlock.stderr.exp-glibc2.8 \
337 tc09_bad_unlock.stderr.exp-s390 \
338 tc09_bad_unlock.stderr.exp-solaris \
339 tc09_bad_unlock.stderr.exp-freebsd \
340 tc09_bad_unlock.stderr.exp-freebsd-clang \
341 tc09_bad_unlock.vgtest \
342 tc10_rec_lock.stderr.exp \
343 tc10_rec_lock.vgtest \
344 tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp \
346 tc12_rwl_trivial.stderr.exp \
347 tc12_rwl_trivial.vgtest \
348 tc13_laog1.stderr.exp \
350 tc15_laog_lockdel.stderr.exp \
351 tc15_laog_lockdel.vgtest \
352 tc16_byterace.stderr.exp \
353 tc16_byterace.vgtest \
354 tc17_sembar.stderr.exp \
356 tc18_semabuse.stderr.exp \
357 tc18_semabuse.stderr.exp-solaris \
358 tc18_semabuse.vgtest \
359 tc19_shadowmem.stderr.exp-32bit \
360 tc19_shadowmem.stderr.exp-32bit-BE \
361 tc19_shadowmem.stderr.exp-32on64 \
362 tc19_shadowmem.stderr.exp-64bit \
363 tc19_shadowmem.vgtest \
364 tc21_pthonce.stderr.exp \
365 tc21_pthonce.stdout.exp \
366 tc21_pthonce.vgtest \
367 tc22_exit_w_lock.stderr.exp-32bit \
368 tc22_exit_w_lock.stderr.exp-64bit \
369 tc22_exit_w_lock.vgtest \
370 tc23_bogus_condwait.stderr.exp-linux-x86 \
371 tc23_bogus_condwait.stderr.exp-linux-ppc \
372 tc23_bogus_condwait.stderr.exp-darwin-x86 \
373 tc23_bogus_condwait.stderr.exp-darwin-amd64 \
374 tc23_bogus_condwait.stderr.exp-freebsd \
375 tc23_bogus_condwait.vgtest \
376 tc24_nonzero_sem.stderr.exp \
377 tc24_nonzero_sem.vgtest \
378 thrd_create.stderr.exp \
380 thread_name.stderr.exp \
382 thread_name_xml.stderr.exp \
383 thread_name_xml.vgtest \
384 thread_name_freebsd.stderr.exp \
385 thread_name_freebsd.vgtest \
386 threaded-fork.stderr.exp \
387 threaded-fork.vgtest \
388 threaded-fork-vcs.stderr.exp \
389 threaded-fork-vcs.vgtest \
390 timed_mutex.stderr.exp \
392 tls_threads.stderr.exp \
396 unit_bitmap.stderr.exp \
406 annotate_ignore_write \
407 annotate_publish_hg \
409 annotate_trace_memory \
426 pth_cleanup_handler \
427 pth_cond_destroy_busy \
433 pth_inconsistent_cond_wait \
436 pth_process_shared_mutex \
440 rwlock_type_checking \
454 check_PROGRAMS += boost_thread
457 if HAVE_BUILTIN_ATOMIC
466 if HAVE_BUILTIN_ATOMIC_CXX
468 annotate_smart_pointer
471 if !VGCONF_OS_IS_FREEBSD
472 check_PROGRAMS += tsan_unittest \
473 pth_uninitialized_cond
476 # clang 3.3 will generate errors about libstdc++ headers from
477 # gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
478 if CXX_CAN_INCLUDE_THREAD_HEADER
479 if HAVE_SHARED_POINTER_ANNOTATION
486 if CXX_CAN_INCLUDE_CONDITION_VARIABLE_HEADER
491 if CXX_CAN_USE_SHARED_TIMED_MUTEX
496 if CXX_CAN_USE_TIMED_MUTEX
502 check_PROGRAMS += omp_matinv omp_prime omp_printf
505 if HAVE_PTHREAD_BARRIER
516 if HAVE_PTHREAD_CREATE_GLIBC_2_0
517 check_PROGRAMS += pth_create_glibc_2_0
520 if HAVE_PTHREAD_SPINLOCK
521 check_PROGRAMS += pth_spinlock
525 check_PROGRAMS += swapcontext
529 check_PROGRAMS += thrd_create
532 if !VGCONF_OS_IS_DARWIN
533 check_PROGRAMS += sem_wait
536 if VGCONF_OS_IS_FREEBSD
537 check_PROGRAMS += thread_name_freebsd
541 AM_CFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
542 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ @FLAG_FALIGNED_NEW@ \
543 -Wno-inline -Wno-unused-parameter
547 annotate_sem_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@
548 annotate_rwlock_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@
549 bug322621_SOURCES = bug322621.cpp
550 condvar_SOURCES = condvar.cpp
551 condvar_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
552 concurrent_close_SOURCES = concurrent_close.cpp
553 if !VGCONF_OS_IS_FREEBSD
554 dlopen_main_LDADD = -ldl
556 dlopen_lib_so_SOURCES = dlopen_lib.c
557 dlopen_lib_so_CFLAGS = -fPIC
558 dlopen_lib_so_LDFLAGS = -shared -fPIC
559 monitor_example_SOURCES = monitor_example.cpp
560 new_delete_SOURCES = new_delete.cpp
561 new_delete_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_MISMATCHED_NEW_DELETE@
563 free_is_write_CFLAGS = $(AM_CFLAGS)
564 pth_barrier_CFLAGS = $(AM_CFLAGS)
565 if VGCONF_OS_IS_SOLARIS
566 free_is_write_CFLAGS += -D__EXTENSIONS__
567 pth_barrier_CFLAGS += -D__EXTENSIONS__
570 pth_create_chain_CFLAGS = $(AM_CFLAGS)
571 pth_detached_CFLAGS = $(AM_CFLAGS)
572 if VGCONF_OS_IS_SOLARIS
573 pth_create_chain_CFLAGS += -D__EXTENSIONS__
574 pth_detached_CFLAGS += -D__EXTENSIONS__
577 tsan_unittest_SOURCES = tsan_unittest.cpp
578 tsan_unittest_CXXFLAGS = $(AM_CXXFLAGS) \
579 -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"'
581 unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \
582 -DENABLE_DRD_CONSISTENCY_CHECKS \
583 @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
584 unit_bitmap_LDADD = # nothing, i.e. not -lpthread
586 unit_vc_CFLAGS = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
587 unit_vc_LDADD = # nothing, i.e. not -lpthread
590 boost_thread_SOURCES = boost_thread.cpp
591 boost_thread_CXXFLAGS = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
592 boost_thread_LDADD = $(BOOST_LIBS)
595 if HAVE_BUILTIN_ATOMIC
596 annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp
599 annotate_static_SOURCES = annotate_static.cpp
600 annotate_static_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNUSED_FUNCTION@
602 local_static_SOURCES = local_static.cpp
605 omp_matinv_CFLAGS = $(AM_CFLAGS) -fopenmp
606 omp_matinv_LDFLAGS = -fopenmp
607 omp_matinv_LDADD = $(LDADD) -lm
609 omp_prime_CFLAGS = $(AM_CFLAGS) -fopenmp
610 omp_prime_LDFLAGS = -fopenmp
611 omp_prime_LDADD = $(LDADD) -lm
613 omp_printf_CFLAGS = $(AM_CFLAGS) -fopenmp
614 omp_printf_LDFLAGS = -fopenmp
615 omp_printf_LDADD = $(LDADD) -lm
618 matinv_CFLAGS = $(AM_CFLAGS)
619 if VGCONF_OS_IS_SOLARIS
620 matinv_CFLAGS += -D__EXTENSIONS__
622 if HAVE_PTHREAD_BARRIER
623 matinv_LDADD = $(LDADD) -lm
626 rwlock_test_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@
627 if VGCONF_OS_IS_SOLARIS
628 rwlock_test_CFLAGS += -D__EXTENSIONS__
631 shared_timed_mutex_SOURCES = shared_timed_mutex.cpp
632 shared_timed_mutex_CXXFLAGS = $(AM_CXXFLAGS) -std=c++1y
634 std_atomic_SOURCES = std_atomic.cpp
635 std_atomic_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x @FLAG_W_NO_SIGN_COMPARE@
637 std_list_SOURCES = std_list.cpp
638 std_list_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x @FLAG_W_NO_SIGN_COMPARE@
640 std_mutex_SOURCES = std_mutex.cpp
641 std_mutex_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x @FLAG_W_NO_SIGN_COMPARE@
642 std_mutex_LDFLAGS = -pthread
644 std_string_SOURCES = std_string.cpp
645 std_string_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x @FLAG_W_NO_SIGN_COMPARE@
647 # Note: -Wl,--no-as-needed is a workaround for
648 # https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
650 std_thread_SOURCES = std_thread.cpp
651 std_thread_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
652 if !VGCONF_OS_IS_SOLARIS
653 std_thread_LDFLAGS = -Wl,--no-as-needed
656 std_thread2_SOURCES = std_thread2.cpp
657 std_thread2_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
658 if !VGCONF_OS_IS_SOLARIS
659 std_thread2_LDFLAGS = -Wl,--no-as-needed
662 sem_wait_SOURCES = sem_wait.cpp
664 swapcontext_SOURCES = swapcontext.c
665 swapcontext_CFLAGS = $(AM_CFLAGS) -g
666 if VGCONF_OS_IS_SOLARIS
667 swapcontext_CFLAGS += -D__EXTENSIONS__
670 timed_mutex_SOURCES = timed_mutex.cpp
671 timed_mutex_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
673 thrd_create_SOURCES = thrd_create.c
674 if VGCONF_OS_IS_FREEBSD
675 thrd_create_LDFLAGS = -lstdthreads