• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2include $(top_srcdir)/Makefile.tool-tests.am
3
4dist_noinst_SCRIPTS =		    \
5	compare_error_count_with    \
6	filter_annotate_barrier_xml \
7	filter_error_count	    \
8	filter_error_summary	    \
9	filter_stderr               \
10	filter_stderr_and_thread_no \
11	filter_stderr_and_thread_no_and_offset \
12	filter_thread_no	    \
13	filter_xml_and_thread_no    \
14	run_openmp_test             \
15	supported_libpthread	    \
16	supported_sem_init
17
18noinst_HEADERS =                                    \
19	tsan_thread_wrappers_pthread.h		    \
20	unified_annotations.h
21
22EXTRA_DIST =                                        \
23	annotate_barrier.stderr.exp		    \
24	annotate_barrier.vgtest			    \
25	annotate_barrier_xml.stderr.exp		    \
26	annotate_barrier_xml.vgtest		    \
27	annotate_hb_err.stderr.exp		    \
28	annotate_hb_err.vgtest			    \
29	annotate_hb_race.stderr.exp		    \
30	annotate_hb_race.vgtest			    \
31	annotate_hbefore.stderr.exp		    \
32	annotate_hbefore.vgtest			    \
33	annotate_order_1.stderr.exp		    \
34	annotate_order_1.vgtest			    \
35	annotate_order_2.stderr.exp		    \
36	annotate_order_2.vgtest			    \
37	annotate_order_3.stderr.exp		    \
38	annotate_order_3.vgtest			    \
39	annotate_publish_hg.stderr.exp		    \
40	annotate_publish_hg.vgtest		    \
41	annotate_smart_pointer.stderr.exp	    \
42	annotate_smart_pointer.vgtest		    \
43	annotate_smart_pointer2.stderr.exp	    \
44	annotate_smart_pointer2.stderr.exp-darwin   \
45	annotate_smart_pointer2.vgtest		    \
46	annotate_spinlock.stderr.exp		    \
47	annotate_spinlock.vgtest		    \
48	annotate_rwlock.stderr.exp		    \
49	annotate_rwlock.vgtest			    \
50	annotate_rwlock_hg.stderr.exp		    \
51	annotate_rwlock_hg.vgtest		    \
52	annotate_ignore_read.stderr.exp		    \
53	annotate_ignore_read.vgtest		    \
54	annotate_ignore_rw.stderr.exp		    \
55	annotate_ignore_rw.vgtest		    \
56	annotate_ignore_rw2.stderr.exp		    \
57	annotate_ignore_rw2.vgtest		    \
58	annotate_ignore_write.stderr.exp	    \
59	annotate_ignore_write.vgtest		    \
60	annotate_ignore_write2.stderr.exp	    \
61	annotate_ignore_write2.vgtest		    \
62	annotate_trace_memory.stderr.exp-32bit	    \
63	annotate_trace_memory.stderr.exp-64bit	    \
64	annotate_trace_memory.stderr.exp-mips32	   \
65	annotate_trace_memory.vgtest		    \
66	annotate_trace_memory_xml.stderr.exp-32bit  \
67	annotate_trace_memory_xml.stderr.exp-64bit  \
68	annotate_trace_memory_xml.stderr.exp-mips32 \
69	annotate_trace_memory_xml.vgtest	    \
70	annotate_sem.stderr.exp                     \
71	annotate_sem.vgtest                         \
72	annotate_static.stderr.exp	            \
73	annotate_static.vgtest		            \
74	atomic_var.stderr.exp			    \
75	atomic_var.vgtest			    \
76	bar_bad.stderr.exp			    \
77	bar_bad.vgtest				    \
78	bar_bad_xml.stderr.exp			    \
79	bar_bad_xml.vgtest			    \
80	bar_trivial.stderr.exp			    \
81	bar_trivial.stdout.exp			    \
82	bar_trivial.vgtest			    \
83	boost_thread.stderr.exp			    \
84	boost_thread.vgtest			    \
85	bug-235681.stderr.exp			    \
86	bug-235681.vgtest			    \
87	circular_buffer.stderr.exp		    \
88	circular_buffer.vgtest			    \
89	concurrent_close.stderr.exp		    \
90	concurrent_close.vgtest			    \
91	custom_alloc.stderr.exp			    \
92	custom_alloc.vgtest			    \
93	custom_alloc_fiw.stderr.exp		    \
94	custom_alloc_fiw.vgtest			    \
95	fp_race.stderr.exp                          \
96	fp_race.stderr.exp-mips32-be                \
97	fp_race.stderr.exp-mips32-le                \
98	fp_race.vgtest                              \
99	fp_race2.stderr.exp                         \
100	fp_race2.vgtest                             \
101	fp_race_xml.stderr.exp                      \
102	fp_race_xml.stderr.exp-mips32-be            \
103	fp_race_xml.stderr.exp-mips32-le            \
104	fp_race_xml.vgtest                          \
105	free_is_write.stderr.exp		    \
106	free_is_write.vgtest			    \
107	free_is_write2.stderr.exp		    \
108	free_is_write2.vgtest			    \
109	hg01_all_ok.stderr.exp                      \
110	hg01_all_ok.vgtest                          \
111	hg02_deadlock.stderr.exp                    \
112	hg02_deadlock.vgtest                        \
113	hg03_inherit.stderr.exp                     \
114	hg03_inherit.vgtest                         \
115	hg04_race.stderr.exp                        \
116	hg04_race.vgtest                            \
117	hg05_race2.stderr.exp                       \
118	hg05_race2.stderr.exp-powerpc               \
119	hg05_race2.vgtest                           \
120	hg06_readshared.stderr.exp                  \
121	hg06_readshared.vgtest                      \
122	hold_lock_1.stderr.exp                      \
123	hold_lock_1.vgtest                          \
124	hold_lock_2.stderr.exp                      \
125	hold_lock_2.vgtest                          \
126	linuxthreads_det.stderr.exp                 \
127	linuxthreads_det.stderr.exp-linuxthreads    \
128	linuxthreads_det.stdout.exp                 \
129	linuxthreads_det.stdout.exp-linuxthreads    \
130	linuxthreads_det.vgtest                     \
131	matinv.stderr.exp                           \
132	matinv.stdout.exp                           \
133	matinv.vgtest                               \
134	memory_allocation.stderr.exp		    \
135	memory_allocation.vgtest		    \
136	monitor_example.stderr.exp		    \
137	monitor_example.vgtest			    \
138	new_delete.stderr.exp                       \
139	new_delete.vgtest                           \
140	omp_matinv.stderr.exp                       \
141	omp_matinv.stdout.exp                       \
142	omp_matinv.vgtest                           \
143	omp_matinv_racy.stderr.exp                  \
144	omp_matinv_racy.stdout.exp                  \
145	omp_matinv_racy.vgtest                      \
146	omp_prime_racy.stderr.exp                   \
147	omp_prime_racy.vgtest                       \
148	omp_printf.stderr.exp                       \
149	omp_printf.vgtest                           \
150	pth_barrier.stderr.exp                      \
151	pth_barrier.vgtest                          \
152	pth_barrier2.stderr.exp                     \
153	pth_barrier2.vgtest                         \
154	pth_barrier3.stderr.exp                     \
155	pth_barrier3.vgtest                         \
156	pth_barrier_race.stderr.exp                 \
157	pth_barrier_race.vgtest                     \
158	pth_barrier_reinit.stderr.exp               \
159	pth_barrier_reinit.vgtest                   \
160	pth_barrier_thr_cr.stderr.exp               \
161	pth_barrier_thr_cr.vgtest                   \
162	pth_barrier_thr_cr.supp                     \
163	pth_broadcast.stderr.exp                    \
164	pth_broadcast.vgtest                        \
165	pth_cancel_locked.stderr.exp		    \
166	pth_cancel_locked.stderr.exp-darwin	    \
167	pth_cancel_locked.vgtest		    \
168	pth_cleanup_handler.stderr.exp		    \
169	pth_cleanup_handler.vgtest		    \
170	pth_cond_destroy_busy.stderr.exp            \
171	pth_cond_destroy_busy.vgtest                \
172	pth_cond_race.stderr.exp                    \
173	pth_cond_race.vgtest                        \
174	pth_cond_race2.stderr.exp                   \
175	pth_cond_race2.vgtest                       \
176	pth_cond_race3.stderr.exp                   \
177	pth_cond_race3.vgtest                       \
178	pth_create_chain.stderr.exp                 \
179	pth_create_chain.vgtest                     \
180	pth_create_glibc_2_0.stderr.exp             \
181	pth_create_glibc_2_0.vgtest                 \
182	pth_detached.stderr.exp                     \
183	pth_detached.stdout.exp                     \
184	pth_detached.vgtest                         \
185	pth_detached2.stderr.exp                    \
186	pth_detached2.stdout.exp                    \
187	pth_detached2.vgtest                        \
188	pth_detached3.stderr.exp1                   \
189	pth_detached3.stderr.exp2                   \
190	pth_detached3.vgtest                        \
191	pth_detached_sem.stderr.exp                 \
192	pth_detached_sem.stdout.exp                 \
193	pth_detached_sem.vgtest                     \
194	pth_inconsistent_cond_wait.stderr.exp1      \
195	pth_inconsistent_cond_wait.stderr.exp2      \
196	pth_inconsistent_cond_wait.vgtest           \
197	pth_mutex_reinit.stderr.exp		    \
198	pth_mutex_reinit.vgtest			    \
199	pth_once.stderr.exp			    \
200	pth_once.vgtest				    \
201	pth_process_shared_mutex.stderr.exp         \
202	pth_process_shared_mutex.vgtest             \
203	pth_spinlock.stderr.exp                     \
204	pth_spinlock.vgtest                         \
205	pth_uninitialized_cond.stderr.exp           \
206	pth_uninitialized_cond.vgtest               \
207	read_and_free_race.stderr.exp		    \
208	read_and_free_race.vgtest		    \
209	recursive_mutex.stderr.exp-linux            \
210	recursive_mutex.stderr.exp-darwin           \
211	recursive_mutex.vgtest                      \
212	rwlock_race.stderr.exp	                    \
213	rwlock_race.stderr.exp2	                    \
214	rwlock_race.vgtest                          \
215	rwlock_test.stderr.exp	                    \
216	rwlock_test.vgtest                          \
217	rwlock_type_checking.stderr.exp	            \
218	rwlock_type_checking.vgtest                 \
219	sem_as_mutex.stderr.exp                     \
220	sem_as_mutex.stderr.exp-mips32-be           \
221	sem_as_mutex.stderr.exp-mips32-le           \
222	sem_as_mutex.vgtest                         \
223	sem_as_mutex2.stderr.exp                    \
224	sem_as_mutex2.vgtest                        \
225	sem_as_mutex3.stderr.exp                    \
226	sem_as_mutex3.stderr.exp-mips32-be          \
227	sem_as_mutex3.stderr.exp-mips32-le          \
228	sem_as_mutex3.vgtest                        \
229	sem_open.stderr.exp                         \
230	sem_open.stderr.exp-mips32-be               \
231	sem_open.stderr.exp-mips32-le               \
232	sem_open.vgtest                             \
233	sem_open2.stderr.exp                        \
234	sem_open2.vgtest                            \
235	sem_open3.stderr.exp                        \
236	sem_open3.stderr.exp-mips32-be              \
237	sem_open3.stderr.exp-mips32-le              \
238	sem_open3.vgtest                            \
239	sem_open_traced.stderr.exp                  \
240	sem_open_traced.vgtest                      \
241	sem_wait.stderr.exp                         \
242	sem_wait.vgtest                             \
243	sigalrm.stderr.exp                          \
244	sigalrm.vgtest                              \
245	sigaltstack.stderr.exp                      \
246	sigaltstack.vgtest                          \
247	std_atomic.stderr.exp		  	    \
248	std_atomic.vgtest			            \
249	std_list.stderr.exp		  	    \
250	std_list.vgtest			            \
251	std_string.stderr.exp		  	    \
252	std_string.vgtest			    \
253	std_thread.stderr.exp		  	    \
254	std_thread.vgtest			    \
255	str_tester.stderr.exp		  	    \
256	str_tester.vgtest			    \
257	tc01_simple_race.stderr.exp                 \
258	tc01_simple_race.vgtest                     \
259	tc02_simple_tls.stderr.exp                  \
260	tc02_simple_tls.vgtest                      \
261	tc03_re_excl.stderr.exp                     \
262	tc03_re_excl.vgtest                         \
263	tc04_free_lock.stderr.exp-x86               \
264	tc04_free_lock.stderr.exp-ppc               \
265	tc04_free_lock.stderr.exp-s390              \
266	tc04_free_lock.vgtest                       \
267	tc05_simple_race.stderr.exp                 \
268	tc05_simple_race.vgtest                     \
269	tc06_two_races.stderr.exp                   \
270	tc06_two_races.vgtest                       \
271	tc07_hbl1.stderr.exp                        \
272	tc07_hbl1.stdout.exp                        \
273	tc07_hbl1.vgtest                            \
274	tc08_hbl2.stderr.exp                        \
275	tc08_hbl2.stdout.exp                        \
276	tc08_hbl2.vgtest                            \
277	tc09_bad_unlock.stderr.exp-x86              \
278	tc09_bad_unlock.stderr.exp-ppc              \
279	tc09_bad_unlock.stderr.exp-glibc2.8         \
280	tc09_bad_unlock.stderr.exp-s390             \
281	tc09_bad_unlock.vgtest                      \
282	tc10_rec_lock.stderr.exp                    \
283	tc10_rec_lock.vgtest                        \
284	tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp   \
285	tc11_XCHG.vgtest                            \
286	tc12_rwl_trivial.stderr.exp                 \
287	tc12_rwl_trivial.vgtest                     \
288	tc13_laog1.stderr.exp                       \
289	tc13_laog1.vgtest                           \
290	tc15_laog_lockdel.stderr.exp                \
291	tc15_laog_lockdel.vgtest                    \
292	tc16_byterace.stderr.exp                    \
293	tc16_byterace.vgtest                        \
294	tc17_sembar.stderr.exp                      \
295	tc17_sembar.vgtest                          \
296	tc18_semabuse.stderr.exp                    \
297	tc18_semabuse.vgtest                        \
298	tc19_shadowmem.stderr.exp-32bit             \
299	tc19_shadowmem.stderr.exp-64bit             \
300	tc19_shadowmem.vgtest                       \
301	tc21_pthonce.stderr.exp                     \
302	tc21_pthonce.stdout.exp                     \
303	tc21_pthonce.vgtest                         \
304	tc22_exit_w_lock.stderr.exp-32bit	    \
305	tc22_exit_w_lock.stderr.exp-64bit           \
306	tc22_exit_w_lock.vgtest                     \
307	tc23_bogus_condwait.stderr.exp-linux-x86    \
308	tc23_bogus_condwait.stderr.exp-linux-ppc    \
309	tc23_bogus_condwait.stderr.exp-darwin-x86   \
310	tc23_bogus_condwait.stderr.exp-darwin-amd64 \
311	tc23_bogus_condwait.vgtest                  \
312	tc24_nonzero_sem.stderr.exp                 \
313	tc24_nonzero_sem.vgtest                     \
314	thread_name.stderr.exp			    \
315	thread_name.vgtest			    \
316	thread_name_xml.stderr.exp		    \
317	thread_name_xml.vgtest			    \
318	threaded-fork.stderr.exp		    \
319	threaded-fork.vgtest			    \
320	trylock.stderr.exp                          \
321	trylock.vgtest				    \
322	unit_bitmap.stderr.exp                      \
323	unit_bitmap.vgtest                          \
324	unit_vc.stderr.exp                          \
325	unit_vc.vgtest
326
327
328check_PROGRAMS =      \
329  annotate_hb_err     \
330  annotate_hb_race    \
331  annotate_ignore_rw  \
332  annotate_ignore_write \
333  annotate_publish_hg \
334  annotate_static     \
335  annotate_trace_memory \
336  bug-235681          \
337  custom_alloc        \
338  concurrent_close    \
339  fp_race             \
340  free_is_write	      \
341  hold_lock           \
342  linuxthreads_det    \
343  memory_allocation   \
344  monitor_example     \
345  new_delete          \
346  pth_broadcast       \
347  pth_cancel_locked   \
348  pth_cleanup_handler \
349  pth_cond_destroy_busy \
350  pth_cond_race       \
351  pth_create_chain    \
352  pth_detached        \
353  pth_detached_sem    \
354  pth_detached3       \
355  pth_inconsistent_cond_wait \
356  pth_mutex_reinit    \
357  pth_process_shared_mutex   \
358  pth_uninitialized_cond \
359  recursive_mutex     \
360  rwlock_race         \
361  rwlock_test         \
362  rwlock_type_checking \
363  sem_as_mutex        \
364  sem_open            \
365  sigalrm             \
366  thread_name         \
367  threaded-fork       \
368  trylock             \
369  unit_bitmap         \
370  unit_vc
371
372if HAVE_BOOST_1_35
373check_PROGRAMS += boost_thread
374endif
375
376if HAVE_BUILTIN_ATOMIC
377check_PROGRAMS +=        \
378  annotate_barrier       \
379  annotate_rwlock        \
380  annotate_sem           \
381  atomic_var             \
382  circular_buffer
383endif
384
385if HAVE_BUILTIN_ATOMIC_CXX
386check_PROGRAMS +=        \
387  annotate_smart_pointer \
388  tsan_unittest
389endif
390
391# clang 3.3 will generate errors about libstdc++ headers from
392# gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
393if CXX_CAN_INCLUDE_THREAD_HEADER
394if HAVE_SHARED_POINTER_ANNOTATION
395check_PROGRAMS += \
396  std_atomic      \
397  std_list        \
398  std_string      \
399  std_thread
400endif
401endif
402
403if HAVE_OPENMP
404check_PROGRAMS += omp_matinv omp_prime omp_printf
405endif
406
407if HAVE_PTHREAD_BARRIER
408check_PROGRAMS += matinv pth_barrier pth_barrier_race pth_barrier_reinit \
409	pth_barrier_thr_cr
410endif
411
412if HAVE_PTHREAD_CREATE_GLIBC_2_0
413check_PROGRAMS += pth_create_glibc_2_0
414endif
415
416if HAVE_PTHREAD_SPINLOCK
417check_PROGRAMS += pth_spinlock
418endif
419
420if !VGCONF_OS_IS_DARWIN
421check_PROGRAMS += sem_wait
422endif
423
424
425AM_CFLAGS   += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
426AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
427
428LDADD = -lpthread
429
430
431concurrent_close_SOURCES    = concurrent_close.cpp
432monitor_example_SOURCES     = monitor_example.cpp
433new_delete_SOURCES          = new_delete.cpp
434
435pth_cleanup_handler_CFLAGS  = $(AM_CFLAGS) @FLAG_W_NO_EMPTY_BODY@
436
437tsan_unittest_SOURCES       = tsan_unittest.cpp
438tsan_unittest_CXXFLAGS      = $(AM_CXXFLAGS) \
439			-DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"'
440
441unit_bitmap_CFLAGS          = $(AM_CFLAGS) -O2 \
442                              -DENABLE_DRD_CONSISTENCY_CHECKS \
443                              @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
444unit_bitmap_LDADD           = # nothing, i.e. not -lpthread
445
446unit_vc_CFLAGS              = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
447unit_vc_LDADD               = # nothing, i.e. not -lpthread
448
449if HAVE_BOOST_1_35
450boost_thread_SOURCES        = boost_thread.cpp
451boost_thread_CXXFLAGS       = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
452boost_thread_LDADD          = $(BOOST_LIBS)
453endif
454
455if HAVE_BUILTIN_ATOMIC
456annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp
457endif
458
459annotate_static_SOURCES     = annotate_static.cpp
460
461if HAVE_OPENMP
462omp_matinv_CFLAGS           = $(AM_CFLAGS) -fopenmp
463omp_matinv_LDFLAGS          = -fopenmp
464omp_matinv_LDADD            = $(LDADD) -lm
465
466omp_prime_CFLAGS            = $(AM_CFLAGS) -fopenmp
467omp_prime_LDFLAGS           = -fopenmp
468omp_prime_LDADD             = $(LDADD) -lm
469
470omp_printf_CFLAGS           = $(AM_CFLAGS) -fopenmp
471omp_printf_LDFLAGS          = -fopenmp
472omp_printf_LDADD            = $(LDADD) -lm
473endif
474
475if HAVE_PTHREAD_BARRIER
476matinv_LDADD                = $(LDADD) -lm
477endif
478
479std_atomic_SOURCES          = std_atomic.cpp
480std_atomic_CXXFLAGS         = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
481
482std_list_SOURCES            = std_list.cpp
483std_list_CXXFLAGS           = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
484
485std_string_SOURCES          = std_string.cpp
486std_string_CXXFLAGS         = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
487
488std_thread_SOURCES          = std_thread.cpp
489std_thread_CXXFLAGS         = $(AM_CXXFLAGS) -std=c++0x
490
491sem_wait_SOURCES            = sem_wait.cpp
492